This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: Custization: HTML without <html>, <head> and <body> tags
- From: Bob Stayton <bobs at caldera dot com>
- To: Gisbert Amm <gia at webde-ag dot de>, Docbook-List <docbook at lists dot oasis-open dot org>
- Date: Thu, 11 Jul 2002 11:05:32 -0700
- Subject: Re: DOCBOOK: Custization: HTML without <html>, <head> and <body> tags
- References: <3D2D9A48.3010807@webde-ag.de>
On Thu, Jul 11, 2002 at 04:46:32PM +0200, Gisbert Amm wrote:
> Hi all,
>
> I transform docbook to HTML on the fly within a webserver.
> Headers and footers are generated from other XML sources depending on
> the context.
>
> For this purpose I need an XSLT customization layer to just leave out
> the <html>, <head> and <body> tags in the HTML output (and the whole
> header too, of course).
>
> The HTML stream generated from the docbook source should for instance
> start with
>
> <div class="article"> instead of <html><head>
>
> and end up with
>
> </div> instead of </body></html>.
>
> Has anybody already written such a customization layer and can give some
> hints?
> Or is there simply a parameter to switch the <html> page "frame" off?
No parameter, but an easy customization.
Currently the HTML head stuff is output by
this template in html/docbook.xsl:
<xsl:template match="*" mode="process.root">
If you only want to modify this for articles,
you could add a template in mode "process.root"
to your html customization layer:
<xsl:template match="article" mode="process.root">
<xsl:apply-templates select="."/>
</xsl:template>
Then it will not output the <head><body> stuff, but
it will process everything in the document
as html.
--
Bob Stayton 400 Encinal Street
Publications Architect Santa Cruz, CA 95060
Technical Publications voice: (831) 427-7796
Caldera International, Inc. fax: (831) 429-1887
email: bobs@caldera.com