johkar
johkar

Reputation: 11

Saxon 9 parser and indent="no" - How to remove 'pretty-print'?

Setting indent="no" has no effect with Saxon 9. I guess it is optional in the spec; it isn't really a bug or anything with Saxon. Is there any way to remove the "pretty print"? We save off the XML and it is quite a bit bigger with all the indents.

Upvotes: 1

Views: 1297

Answers (1)

Dimitre Novatchev
Dimitre Novatchev

Reputation: 243539

Use:

<xsl:strip-space elements="*"/>

The reason there is still indentation without including the above xslt instruction, is that whitespace-only nodes get copied.

Upvotes: 2

Related Questions