Subject: | xsl:result-document element doesn't work |
Even with the output method "default" being passed as the second parameter to transform(),
XML::Saxon::XSLT2 appears to ignore the format requested with xsl:result-document. Here's
a sample source document and stylesheet:
in.xml:
<?xml version="1.0" encoding="UTF-8"?>
<empty>
</empty>
out.xsl:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:output name="text" method="text" encoding="utf-8" />
<xsl:template match="/">
<xsl:result-document format="text">
<outElement>This should not be wrapped in a tag.</outElement>
</xsl:result-document>
</xsl:template>
</xsl:stylesheet>
When processing this stylesheet with the net.sf.Saxon.Transform tool, it correctly produces
the output "This should not be wrapped in a tag.". When processing it with
XML::Saxon::XSLT2, it produces "<?xml version="1.0" encoding="UTF-8"?>
<outElement>This should not be wrapped in a tag.</outElement>"
I've attached a zip file with these source fragments and a simple driver script that
demonstrates the problem. I tried to dig into the source to figure out what is causing the
problem, but I got lost in all the indirection in the Saxon API.
Subject: | output-bug.zip |
Message body not shown because it is not plain text.