Bug #4959
closedxsl:output/@method overrides xsl:result-document/@method when delivery-format=serialized
100%
Description
When invoking a stylesheet via transform() and setting delivery-format to "serialized", the xsl:output/@method of the invoked stylesheet overrides any and all xsl:result-document/@method values.
If you run test.xsl (against any document), it produces the expected serialization for each xsl:result-document (secondary1.txt and secondary2.xml), honoring xsl:result-document/@method regardless of what xsl:output/@method says. This is what I would expect.
But if you invoke test.xsl via run-test.xsl, the xsl:result-document/@method values are ignored, and the xsl:output/@method overrides them all. This seems wrong.
Expected primary output:
main outputActual primary output: main output
Expected content of secondary-outputs.xml: text doc xml doc
Actual content of secondary-outputs.xml: text doc xml doc
If you try changing the xsl:output/@method (in test.xsl) to "xml" instead of "text", running test.xsl by itself still produces the expected results, but invoking it via transform() (in run-test.xsl) causes the same problem: the xsl:result-document/@method values are ignored.
Expected content of secondary-outputs.xml after changing xsl:output/@method to "xml" is the same as the expected content listed above.
Actual content of secondary-outputs.xml after changing xsl:output/@method to "xml": text doc xml doc
I suspect this is a bug. I got the same behavior in both Saxon-HE 9.9.1.4J and Saxon-HE 10.3J.
Files
Please register to edit this issue