Simon,
Um, perhaps I should note that I am not trying to serialize a stylesheet but an arbitrary XML document. But that shouldn't make any difference, does it?
OK. It does. Indention works 'somehow' with a stylesheet, with your code and mine. But not all levels are indented, for example I get
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="all_mighty_master_tag">
</xsl:template>
</xsl:stylesheet>
and
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="all_mighty_master_tag">
<fo:block>
<xsl:value-of .../>
</fo:block>
</xsl:template>
</xsl:stylesheet>
Why does it not work with arbitrary XML?
What I want to do is constructing a DOM from a indented XML file, add/delete elements via the DOM API and serialize the DOM to a file again.
Are there means to do that with Xalan?
I think this is more of a parser issue. I searched the Xerces API and found the DOM Level 3 DOMWriter Interface and related Interfaces but no implementation or factory classes.
Further hints and help are greatly appreciated!
Ralf
