Bug #3229
closedSaxon 9.7 fails to compile xsl:output/@json-node-output-method
100%
Description
The attached stylesheet demonstrates this problem. The full error message is:
Static error in xsl:output/@json-node-output-method on line 7 column 60 of json-node-output-method.xsl:
XTSE0090: Attribute @json-node-output-method is not allowed on element xsl:output
Errors were reported during stylesheet compilation
From my read of the specification even if @json-node-output-method is not supported it should only be ignored, not rejected as invalid:
Unless the processor implements the XPath 3.1 Feature, the method values json and adaptive must be rejected as invalid, and the attributes allow-duplicate-names and json-node-output-method must be ignored.
Files
Updated by Nick Nunes over 7 years ago
Updated by Michael Kay over 7 years ago
- Category set to XSLT conformance
- Status changed from New to In Progress
- Assignee set to Michael Kay
My first reaction is that I'm surprised this should survive testing. I can't find any XSLT 3.0 test case that uses xsl:output/@json-node-output-method, and yet (a) it's defined in the schema-for-xslt30, and (b) we have a test that all element/attribute combinations defined in the schema actually appear in some test stylesheet document. So there's a problem with the way we're testing completeness of the test suite...
You're right that this attribute (together with the other late addition for JSON, allow-duplicate-names) isn't recognized on xsl:output in 9.7.
Updated by Michael Kay over 7 years ago
In fact the test suite does contain a test output-0702 that uses xsl:output/@json-node-output-method, but the test was only added on 2016-12-16, and we generally test Saxon 9.7 against a snapshot of the test suite taken when Saxon 9.7 was first released. Saxon 9.7 is indeed failing this test.
I think that the 9.7 serializer does support this property so it should just be a question of enabling it on xsl:output.
Updated by Michael Kay over 7 years ago
- Status changed from In Progress to Resolved
- Applies to branch 9.7, 9.8 added
- Fix Committed on Branch 9.7, 9.8 added
Fixed XSLOutput so it now recognizes and validates json-node-output-method.
To make JSON serialization work with various s9api API combinations, I also amended the Xslt30Transformer to ensure that controller.buildTree() is set to false when the output method is JSON or Adaptive.
Updated by O'Neil Delpratt over 7 years ago
- Fix Committed on Branch trunk added
- Fix Committed on Branch deleted (
9.8)
Updated by O'Neil Delpratt over 7 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in Maintenance Release 9.7.0.19 added
Bug fix applied in the 9.7.0.19 maintenance release.
Please register to edit this issue