Bug #4600
closed
xsl:output with parameter document using method="adaptive" and character maps goes into infinite recursion
Applies to branch:
10, 9.9
Fix Committed on Branch:
10, 9.9
Fixed in Maintenance Release:
Description
Test case output-0721 created in XSLT3 test suite
- Status changed from New to In Progress
The code at SerializerFactory#210 under if (paramDoc != null) {
creates a new Properties
object on top of the existing properties object and then copies all the properties from the parameter document into the new Properties object.
This properties object then goes to the Adaptive output method. When the adaptive output method is called upon to serialize a node, it obtains a new serializer for this node by calling the SerializerFactory, having layered yet another Properties object, this time with method set to the json-node-output-method (I'm not sure why, because there's no JSON involved here...). We then call QueryResult.serialize with these new properties, and this goes back into the SerializerFactory, which notices that there is a parameter document referenced in the properties object, and reads it to create yet another layer on the Properties stack. Eventually the stack fills and we crash.
Somehow, once a parameter document has been read and applied to the Properties object, it needs to be removed from the Properties object so that it isn't processed again.
Solved the infinite recursion by removing the parameter-document property (actually, setting it to an empty string) when the parameter document is processed.
The spec for the adaptive output method says "A document, element, text, comment, or processing instruction node is serialized using the XML output method described in 5 XML Output Method." so we are wrong to be using the json-node-output-method here.
- Status changed from In Progress to Resolved
- Applies to branch 9.9 added
- Fix Committed on Branch 10, 9.9 added
- % Done changed from 0 to 100
- Fixed in Maintenance Release 10.2 added
Bug fix applied in the Saxon 10.2 maintenance release.
- Status changed from Resolved to Closed
- Fixed in Maintenance Release 9.9.1.8 added
Bug fix applied on the Saxon 9.9.1.8 maintenance release.
Please register to edit this issue
Also available in: Atom
PDF