>When I put <xsl:output method="xml">, then the generated code will
>be automatically formatted/indented...
>I don't want the output to be indented / formatted. I want it the way
>I specified it in the XSL file. Is there a way to do so?
Two-part answer:
1. Put indent="no" in your xsl:output declaration.
2. Look carefully at the whitespace and elements in your stylesheet.
In a stylesheet, a literal result element like
<b>
will get different treatment from an instruction element like
<xsl:element name="b">
regarding the adjacent whitespace. The applicable rules are too
elaborate to describe here, plus they're "generic XSLT" rather than
Xalan-specific, but a little experimentation should get you what you
want. You didn't say why the indentation is a problem, but I'm
assuming that (A) you don't anticipate that humans will need to read
the generated XML, and (B) you want the generated XML to be as dense
or compact as possible. Your stylesheet may have to look a little
less human-readable, depending on the techniques you use.
.................David Marston