Simon,
OutputProperties outputFormat = new OutputProperties(); outputFormat.setProperty(OutputKeys.METHOD, Method.XML); outputFormat.setProperty(OutputKeys.INDENT, "yes"); outputFormat.setProperty(OutputProperties.S_KEY_INDENT_AMOUNT, "7"); Serializer serialiser = SerializerFactory.getSerializer(outputFormat.getProperties());
This has no effect for me. I replaced my code with yours and have the very same results.
Following your advice I removed all whitespace between elements from the source filea and the one-whitespace-indention disappeard, too. Normalizing the DOM has no effect. I tried to write to a FileOutputStream instead of System.out but no change occured.
Try putting <xsl:strip-space elements="*"/> at the top-level of your stylesheet
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?
Thank you very much! Ralf
