This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
RE: [docbook-apps] html fragment
- From: "Marius Scurtescu" <mscurtescu at healthmetrx dot com>
- To: "Bob Stayton" <bobs at sco dot com>
- Cc: "Docbook-Apps" <docbook-apps at lists dot oasis-open dot org>
- Date: Mon, 20 Oct 2003 09:33:33 -0700
- Subject: RE: [docbook-apps] html fragment
Thanks a lot Bob!
I am using the nonchunked output and adding a custom
process.root template to my customization layer
solved the problem.
Marius
> -----Original Message-----
> From: Bob Stayton [mailto:bobs@sco.com]
> Sent: Friday, October 17, 2003 12:47 PM
> To: Marius Scurtescu
> Cc: Docbook-Apps
> Subject: Re: [docbook-apps] html fragment
>
>
> On Fri, Oct 17, 2003 at 12:34:50PM -0700, Marius Scurtescu wrote:
> > Hi,
> >
> > Is it possible to customize the generated HTML such
> > that it does not include the <html>, <head> and
> > <body> tags?
> >
> > The HTML I am generating will be included in some
> > JSP pages which already provide these top level
> > elements.
>
> I assume you are talking about an XSL customization?
> If so, then it depends on whether you are chunking
> or not.
>
> For nonchunked output, you want to customize the
> 'process.root' template in html/docbook.xsl.
>
> For chunked output, you want to customize the
> 'chunk-element-content' template in html/chunk-common.xsl.
>
> In both cases, you want to eliminate the <html> and <body>
> tags, as well as the calls to the header and footer
> templates. There won't be much left. For example,
> process.root would go from this original template:
>
> <xsl:template match="*" mode="process.root">
> <xsl:variable name="doc" select="self::*"/>
>
> <xsl:call-template name="root.messages"/>
>
> <html>
> <head>
> <xsl:call-template name="system.head.content">
> <xsl:with-param name="node" select="$doc"/>
> </xsl:call-template>
> <xsl:call-template name="head.content">
> <xsl:with-param name="node" select="$doc"/>
> </xsl:call-template>
> <xsl:call-template name="user.head.content">
> <xsl:with-param name="node" select="$doc"/>
> </xsl:call-template>
> </head>
> <body>
> <xsl:call-template name="body.attributes"/>
> <xsl:call-template name="user.header.content">
> <xsl:with-param name="node" select="$doc"/>
> </xsl:call-template>
> <xsl:apply-templates select="."/>
> <xsl:call-template name="user.footer.content">
> <xsl:with-param name="node" select="$doc"/>
> </xsl:call-template>
> </body>
> </html>
> </xsl:template>
>
> To just this:
>
> <xsl:template match="*" mode="process.root">
> <xsl:call-template name="root.messages"/>
>
> <xsl:apply-templates select="."/>
>
> </xsl:template>
>
>
>
> --
>
> 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
To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.