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] | [List Home]

Subject: Re: [docbook-apps] is there a good way to turn off doctype declarations in single and chunked xhtml output?

Hi Chris,
I've been running into the same problem.  For chunking, these parameters 
set the doctype, and if you set them to empty strings, then you should get 
no DOCTYPE in your chunked output:

<xsl:param name="chunker.output.doctype-public" select="''"/>
<xsl:param name="chunker.output.doctype-system" select="''"/>

For single file output, it seems to be very hard to eliminate the DOCTYPE. 
The doctype-public and doctype-system attributes in the xsl:output would 
normally control it.  There is such an xsl:output in xhtml/docbook.xsl that 
contains the doctype values for XHTML that you see in your output.

If a stylesheet has more than one xsl:output that specifies the same 
attribute, then the first rule (according to Michael Kay's XSLT 
Programmer's Reference 2nd edition page 272) is that an xsl:output that 
specifies a value for the attribute takes precedence over the one that 
leaves it defaulted.  The second rule is that if several xsl:output 
elements specify a value for the same attribute, the one with the highest 
import precedence wins.

Unfortunately, this combination of rules leaves no option for resetting it 
to blank in the customization layer.  If you leave out the attributes, then 
the original ones apply.  If you add them but set them to an empty value, 
then you get a DOCTYPE with empty values rather than no DOCTYPE.  I haven't 
found a way to override the original to get no DOCTYPE.  I think you have 
to edit the original xsl:output element in xhtml/docbook.xsl to remove the 
attributes.  I hope someone tells me that I'm wrong.

Bob Stayton
Sagehill Enterprises
DocBook Consulting

----- Original Message ----- 
From: "Chris Chiasson" <chris@chiasson.name>
To: "Docbook Apps" <docbook-apps@lists.oasis-open.org>
Sent: Tuesday, October 03, 2006 2:37 PM
Subject: [docbook-apps] is there a good way to turn off doctype 
declarations in single and chunked xhtml output?

> if so, would you please elaborate?
> -- 
> http://chris.chiasson.name/
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org

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