Bug #2302
closed
Node identity: collection() ↔ doc()
Category:
XSLT conformance
Fix Committed on Branch:
9.6
Fixed in Maintenance Release:
Description
Hi Michael,
I believe the following query should yield true when applied on a directory 'dir' with a single XML file 'doc.xml'. Instead, it yields 'false':
collection('dir') is doc('dir/doc.xml')
- Category set to XSLT conformance
- Status changed from New to Resolved
- Priority changed from Low to Normal
Yes, the stability of collections is a known conformance issue. When the standard (default) CollectionURIResolver is used, collections are not stable. In several respects: repeated calls on collection() with the same URI may return different sets of documents, the contents of individual documents may change, and the identity of documents is not necessarily the same as the identify of a document retrieved directly using the doc() function.
These issues will be addressed in Saxon 9.7, which will give the user control over whether to incur the costs associated with stability of collections.
For reference, here's how it will work in 9.7:
Collections can now be stable, meaning that multiple calls with the same collection URI are guaranteed to
return the same results. For conformance with the specifications, this is the default, although it can be
expensive, because the contents of a collection have to be maintained in memory just in case it is used
again. Collection stability can be switched off in several ways: the collection URI can include the query
parameter <code>stable=no</code>; the collection URI resolver can return the property value <code>stable="false"</code>
in the <code>Properties</code> object supplied to the <code>resolve()</code> method; or the Configuration
property <code>FeatureKeys.STABLE_COLLECTION_URI</code> can be set to false.</p>
Thanks for the summary; sounds like a sound solution.
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Found in version changed from EE 9.6.0.4J to 9.6
- Fixed in version set to 9.6.0.5
Bug fix applied in the Saxon 9.6.0.5 maintenance release.
- Sprint/Milestone set to 9.6.0.5
- Applies to branch 9.6 added
- Fix Committed on Branch 9.6 added
- Fixed in Maintenance Release 9.6.0.5 added
Please register to edit this issue
Also available in: Atom
PDF