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] suppressing everything but the content of <body> in xhtml output

One small correction.  You can't do it with a customization layer, because 
of the way xsl:output elements are combined.  I had some correspondence 
with Michael Kay about Saxon's behavior, and he says that once you have the 
doctypes declared, there is no way to completely undeclare them in a 
customization layer.  But you can edit the original xhtml/docbook.xsl file 
to remove the doctype attributes from the xsl:output there.  Ugly, and a 
maintenance headache, but it is possible.

The xsl:output element's attributes in XSLT 1.0 must always be literals. 
You can't use parameter values to set them, so they can't be made 
conditional.  XSLT 2.0 adds named output declarations that can be 

Bob Stayton
Sagehill Enterprises
DocBook Consulting

----- Original Message ----- 
From: "Mauritz Jeanson" <mj@johanneberg.com>
To: "'Brett Leber'" <bleber+@cs.cmu.edu>; "'Bob Stayton'" 
Cc: <docbook-apps@lists.oasis-open.org>
Sent: Tuesday, June 26, 2007 7:43 AM
Subject: RE: [docbook-apps] suppressing everything but the content of 
<body> in xhtml output

>> -----Original Message-----
>> From: Brett Leber
>> Your XSL works, but I get the following at the top of the file, which
>> I'd also like to suppress:
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!DOCTYPE div PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>\
>> How can I do that?
> You can't do that using XSLT. The DOCTYPE declaration comes from
> <xsl:output> in xhtml/docbook.xsl. There is no way of completely 
> suppressing
> it in a customization layer. You can do this:
> <xsl:output omit-xml-declaration="yes" doctype-public=""
> doctype-system=""/>
> But that will still leave
> <!DOCTYPE div PUBLIC "" "">
> in the output.
> /MJ

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