This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
[docbook-apps] Re: [docbook] Chunked XHTML to fixed width
- From: Bob Stayton <bobs at sco dot com>
- To: David Pratt <dave dot pratt at webcoursesnow dot com>
- Cc: docbook-apps at lists dot oasis-open dot org
- Date: Wed, 19 Mar 2003 15:54:09 -0800
- Subject: [docbook-apps] Re: [docbook] Chunked XHTML to fixed width
- References: <BAY1-F188Np7vXee4fD00001ba5@hotmail.com> <E05B768A-5A30-11D7-A0B8-000A27B3B070@webcoursesnow.com>
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 at sco dot com