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 27839 - [xslt 3.0]unparsed-entity-uri (&public-id) dependency on context node
Summary: [xslt 3.0]unparsed-entity-uri (&public-id) dependency on context node
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: 2015-01-15 12:06 UTC by Michael Kay
Modified: 2015-10-29 09:50 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2015-01-15 12:06:16 UTC
In the vast majority of cases where we have constructs that depend on the context item, we have introduced a variant of the construct that allows the relevant item to be supplied explicitly as an operand. Examples are xsl:copy, xsl:number, fn:id, fn:key. This allows the construct to be used without the artifice of having to set the context item using something like xsl:for-each; it is also useful internally within an implementation because it allows the form of the construct that uses the context implicitly to be rewritten to the form where the dependency is explicit, for example id('x') can be rewritten as id('x', /).

The unparsed-entity-uri() and unparsed-entity-public-id() functions have not had this treatment: they can only be applied to the document containing the context item.

I would therefore like to propose introducing a two-argument form of these functions taking a node as the second argument, defaulting to the context node if the argument is not supplied.
Comment 1 Michael Kay 2015-01-15 20:33:37 UTC
The WG accepted the proposal
Comment 2 Michael Kay 2015-01-15 20:49:43 UTC
In implementing the change, I noticed that the return type of unparsed-entity-public-id is given as xs:anyURI. It should surely be xs:string.

I'm fixing this as editorial.