Document identity when doc() or document() selects the initial source document
When doc() is called specifying the same URI as the initial source document, it doesn't find the document in the pool and therefore fetches a new document with different node identity. Apparently this changed in 9.9: previously the initial source document was placed in the pool.
Added XSLT3 test case document-2011, but it allows either outcome because the spec isn't prescriptive on this.
Need to watch out for complications involving strip-space options, accumulators, etc, where the options for a single document can vary from one package to another.
Updated by Michael Kay about 2 years ago
- Status changed from New to Resolved
- Applies to branch 10, 9.9 added
- Fix Committed on Branch 10 added
I think it's actually putting the document in the pool on some activation paths (
Controller.buildSourceTree()) and not others (
Controller.setGlobalContextItem()). I've changed
Controller.setGlobalContextItem() so if a document node is supplied, and it has a known systemId, then it's placed in the pool.
I found some other odd code in
Controller.setGlobalContextItem() -- it was checking any previously-supplied global context node to check it was in the right configuration, but not checking the newly supplied global context node. I've fixed that.
I'm making these changes only on the 10.0 branch, in the interests of stability.
Please register to edit this issue