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



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