Shane Curcuru wrote:
Um, try setting your xsl:output method to something besides xml?  I
don't think we have a normal option in xml output to not output the xml
decl, at least if you're asking us to serialize the result tree.  (I.e.
if the Result is going to a URL - i.e. a file - or a Stream object
somehow, then we put out the xml decl if we're doing xml.  If we're
outputting to a SAXResult or DOMResult, then of course we don't put it
in there, and you can use your own serializer)

The solution appeared to be a little more straight forward. Joe Kesselman sent me the following by mail.

<joe>
 For questions about the formatting of the stylesheet's output, always
 start by looking at the <xsl:output> directive to see if it has a
 control for the purpose.

 In this case, see its omit-xml-declaration feature.
</joe>

I'm sorry to admit that I should have examined my stylesheets more
carefully. I am working with multiply nested XSLT stylesheets by
URL/document function. The top level stylesheet did have the property
omit-xml-declaration set, but one of the nested did not - hence the
prolog appeared in my output, much to my initial surprise..

Morten




Reply via email to