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 28153 - [XT30] document function
Summary: [XT30] document function
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Working drafts
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL: http://www.w3.org/TR/xslt-30/#func-do...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-06 11:08 UTC by Tim Mills
Modified: 2015-10-29 09:50 UTC (History)
0 users

See Also:


Attachments

Description Tim Mills 2015-03-06 11:08:05 UTC
The description of the handling of the $uri-sequence argument to fn:document() needs to be revised, since items in this sequence may be other than a node or atomic value.

For easy of implementation, and clarity of error conditions, would it not make sense to state that this argument is atomized before any processing occurs, and that any errors caused by failure to atomize would be those defined for fn:data?
Comment 1 Michael Kay 2015-03-06 13:15:10 UTC
Thanks for pointing it out. I think it can be fixed simply by s/atomic value/item/ in the third bullet:

If $uri-sequence (after atomizing any nodes) contains an atomic value of a type other than xs:string, xs:anyURI, or xs:untypedAtomic then a type error is raised [ERR XPTY0004]

Atomizing the supplied sequence doesn't work, because the rules for resolving a relative URI are different for nodes and for atomic values.
Comment 2 Michael Kay 2015-03-12 18:05:28 UTC
The WG accepted the proposed fix.

The text has been changed to read:

<p> If <code>$uri-sequence</code> (after atomizing any nodes) contains an 
<phrase diff="chg" at="S-bug28153">item other than an atomic value of type</phrase> <code>xs:string</code>, <code>xs:anyURI</code>, or
<code>xs:untypedAtomic</code> then a type error is raised <xerrorref spec="XP" class="TY" code="0004"/>. </p>