Project

Profile

Help

Bug #4959

closed

xsl:output/@method overrides xsl:result-document/@method when delivery-format=serialized

Added by Evan Lenz over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Serialization
Sprint/Milestone:
-
Start date:
2021-04-01
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
10, trunk
Fix Committed on Branch:
10, trunk
Fixed in Maintenance Release:
Platforms:

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 output

Actual 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

run-test.xsl (1.15 KB) run-test.xsl Evan Lenz, 2021-04-01 07:43
test.xsl (670 Bytes) test.xsl Evan Lenz, 2021-04-01 07:43

Please register to edit this issue

Also available in: Atom PDF