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
conditional.
Bob Stayton
Sagehill Enterprises
DocBook Consulting
[EMAIL PROTECTED]
----- Original Message -----
From: "Mauritz Jeanson" <[EMAIL PROTECTED]>
To: "'Brett Leber'" <[EMAIL PROTECTED]>; "'Bob Stayton'"
<[EMAIL PROTECTED]>
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]