Project

Profile

Help

Bug #2302

closed

Node identity: collection() ↔ doc()

Added by Christian Grün almost 10 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
XSLT conformance
Sprint/Milestone:
Start date:
2015-02-02
Due date:
% Done:

100%

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

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')
Actions #1

Updated by Michael Kay almost 10 years ago

  • 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.

Actions #2

Updated by Michael Kay almost 10 years ago

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>
Actions #3

Updated by Christian Grün almost 10 years ago

Thanks for the summary; sounds like a sound solution.

Actions #4

Updated by O'Neil Delpratt over 9 years ago

  • 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.

Actions #5

Updated by O'Neil Delpratt about 9 years ago

  • 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