OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Subject: Re: DOCBOOK-APPS: Removing <html>,<head> & <body>

Fredrik Svensson wrote:

>When adding content into a page the <html>, <head> and <body> is not
>The docbook.xsl (1.53.0) adds these elements (line 301-326).
>I have currently solved this by commenting out the unwanted portions
>(see example at the end).
>How do I go about changing this in the best way ?
>The <!-- --> will work for now, but is there a better way ?
This answer I got from Bob Stayton when I've been asking the same 
question several weeks ago:

 >    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.

This works fine fo me.

Of course you can do the same for <book>:

 <xsl:template match="book" mode="process.root">
   <xsl:apply-templates select="."/>

>This "feature" will only be called by the webappliction while docbook.xsl
>should remain normal. I guess it is possible to write some simple
>stylesheet that calls docbook.xsl
Yes. You just need a 'customization layer' - a stylesheet that imports 
the original docbook.xsl and overrides all templates you need to change, 
as in the examples above.

Gisbert Amm


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Powered by eList eXpress LLC