[xml/sgml-pkgs] Bug#718535: libxslt1.1: missing newlines with indent="no"

Vincent Lefevre vincent at vinc17.net
Mon Aug 5 01:33:39 UTC 2013


On 2013-08-04 18:12:53 +0200, Nick Wellnhofer wrote:
> libxslt does exactly what you want if you don't provide an indent
> attribute at all.
> 
> indent="yes": Let libxslt add whitespace.
> indent="no": Never add whitespace.
> no indent attribute: Add newline after top-level nodes.

This is rather confusing as the XSLT spec

  http://www.w3.org/TR/xslt

says: "If the indent attribute has the value yes, then the xml output
method may output whitespace in addition to the whitespace in the
result tree (possibly based on whitespace stripped from either the
source document or the stylesheet) in order to indent the result
nicely; if the indent attribute has the value no, it should not output
any additional whitespace. The default value is no."
                           ^^^^^^^^^^^^^^^^^^^^^^^

So, though the behavior is not really disallowed by the spec, I would
have expected indent="no" to give the same result as no indent
attribute. Unfortunately this is not documented, at least in the
man pages, and this change hasn't been announced either.

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



More information about the debian-xml-sgml-pkgs mailing list