This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] xsl:output indent="yes" increases number of pages
- From: Paul Grosso <pgrosso at arbortext dot com>
- To: Joachim Ziegler <ziegler at mpi-sb dot mpg dot de>, docbook-apps <docbook-apps at lists dot oasis-open dot org>
- Date: Tue, 10 Feb 2004 09:33:30 -0600
- Subject: Re: [docbook-apps] xsl:output indent="yes" increases number of pages
At 10:55 2004 02 10 +0100, Joachim Ziegler wrote:
>Hello,
>
>I've just added
>
><xsl:output indent = "yes"/>
>
>to my FO customization layer. Now 418 instead of 416 pages are created.
>As I understand the meaning of the indent attribute (for better human readability of the output) this should not happen. Am I wrong?
indent="yes" should generally be used only for HTML output
destined for browsers (who have non-XML white space handling)
or special situations for XML output, but never with XSL-FO.
White space in XML is always significant (at the parser level)
and will often be at least partially significant at the XSL-FO
formatting level. There is no reason for your generated XSL-FO
to be "pretty-printed" if the point of the processing is to
produce composed output (XSL-FO was not designed for humans to
read, and doing so is even discouraged [1]) and lots of reason
you shouldn't be introducing white space.
As the XSLT spec says [2]:
NOTE: It is usually not safe to use indent="yes" with document types
that include element types with mixed content.
and that is certainly the case for the XSL-FO doctype.
paul
[1] http://www.w3.org/TR/xsl/slice1.html#section-N697-Tree-Transformations
under "Transform to Another Vocabulary" says:
In some implementations of XSL/XSLT, the result of tree construction can be
output as an XML document. This would allow an XML document which contains
formatting objects and formatting properties to be output. This capability
is neither necessary for an XSL processor nor is it encouraged.
[2] http://www.w3.org/TR/xslt#section-XML-Output-Method
To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.