This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] html fragment
- From: Bob Stayton <bobs at sco dot com>
- To: Marius Scurtescu <mscurtescu at healthmetrx dot com>
- Cc: Docbook-Apps <docbook-apps at lists dot oasis-open dot org>
- Date: Fri, 17 Oct 2003 12:46:56 -0700
- Subject: Re: [docbook-apps] html fragment
- References: <INEPKANEJCBOPHOOJHNEMENHCIAA.mscurtescu@healthmetrx.com>
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/.