This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 22663 - [xslt 3.0] strip-space variations across packages
Summary: [xslt 3.0] strip-space variations across packages
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Candidate Recommendation
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-13 12:59 UTC by Michael Kay
Modified: 2014-05-15 14:00 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2013-07-13 12:59:31 UTC
We say that xsl:strip-space/preserve-space affects documents loaded using a call on doc() that appears within the same package.

So what happens if doc() is called in more than one package with the same URI? Do you get different versions of the same document?

If so, can we reconcile this with what F+O says about the stability of the doc() function?
Comment 1 Michael Kay 2013-07-19 09:43:58 UTC
As pointed out in bug #22733, there are similar issues with the input-type-annotations attribute. I think that this should also be scoped to a package, and should affect documents loaded using doc()/document()/collection() calls within that package.

As far as the stability rules are concerned, I think the rule should be that if two calls on doc() within the scope of a transformation process the same absolute URI and use the same rules for space and annotation stripping, then (and only then) they should return the same document node. 

The definition of "the same rules" here needs work on the wording, but essentially it means the same list of nametests controlling strip-space and preserve-space, taking into account the ordering of the rules by import precedence.
Comment 2 Michael Kay 2013-08-01 13:58:44 UTC
It was noted that we could require the calls on doc() in different static contexts to return results that effectively mean the document must only be read once and then have space stripping applied (ie. disallowing reading a version of the document that has changed in the interim)
Comment 3 Michael Kay 2013-09-23 11:00:15 UTC
We (MK+Abel) looked at the proposal in more detail, and came to the conclusion that it is viable.

We should say that the dynamic context for the doc() function depends on which package the call is contained in, and the mapping from URIs to document nodes is therefore different for different packages. We could say that these mappings are permitted to vary ONLY by applying the strip-space and strip-annotations as modifications to some base mapping which must be common across packages; but it's simpler to say nothing, which essentially means that implementations have freedom to allow the mapping in different packages to be completely independent (one resolver/catalog per package) or not, as they see fit.
Comment 4 Michael Kay 2013-09-23 11:38:52 UTC
The proposal has been applied to the baseline document.