[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook] Chunked XHTML to fixed width
On Wed, Mar 19, 2003 at 09:33:19AM -0800, David Pratt wrote: > Hi. I am looking a recommendation for customizing chunked xhtml output > so that the output will be centered within a fixed width of 600 pixels. [I'm moving this over to the docbook-apps list where it belongs.] You could copy the template named "chunk-element-content" from html/chunk-common.xsl to your customization layer and add HTML table tags as a wrapper around the content. See the lines marked NEW below: <xsl:template name="chunk-element-content"> <xsl:param name="prev"/> <xsl:param name="next"/> <xsl:param name="nav.context"/> <xsl:param name="content"> <xsl:apply-imports/> </xsl:param> <html> <xsl:call-template name="html.head"> <xsl:with-param name="prev" select="$prev"/> <xsl:with-param name="next" select="$next"/> </xsl:call-template> <body> <xsl:call-template name="body.attributes"/> <xsl:call-template name="user.header.navigation"/> <xsl:call-template name="header.navigation"> <xsl:with-param name="prev" select="$prev"/> <xsl:with-param name="next" select="$next"/> <xsl:with-param name="nav.context" select="$nav.context"/> </xsl:call-template> <xsl:call-template name="user.header.content"/> <table width="600" align="center"> <!-- NEW --> <tr><td> <!-- NEW --> <xsl:copy-of select="$content"/> </td></tr> <!-- NEW --> </table> <!-- NEW --> <xsl:call-template name="user.footer.content"/> <xsl:call-template name="footer.navigation"> <xsl:with-param name="prev" select="$prev"/> <xsl:with-param name="next" select="$next"/> <xsl:with-param name="nav.context" select="$nav.context"/> </xsl:call-template> <xsl:call-template name="user.footer.navigation"/> </body> </html> </xsl:template> If you also want the running headers and footer to fit inside the 600 pixel width, then move the wrappers to appear just inside the <body> tags. -- Bob Stayton 400 Encinal Street Publications Architect Santa Cruz, CA 95060 Technical Publications voice: (831) 427-7796 The SCO Group fax: (831) 429-1887 email: bobs@sco.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]