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 1432 - [FO] Editorial: fn:collection rewording
Summary: [FO] Editorial: fn:collection rewording
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Functions and Operators 1.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Ashok Malhotra
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-13 23:03 UTC by Michael Rys
Modified: 2005-09-29 11:14 UTC (History)
0 users

See Also:


Attachments

Description Michael Rys 2005-05-13 23:03:32 UTC
The spec currently says: "If $arg is the empty sequence, the function behaves 
as if it had been called without an argument. See below."
The text appears above! 

It also seem to produce two conflicting error messages. It says:

"If $arg ... cannot be resolved, an error is raised [err:FODC0002]." and "If 
Available collections provides no mapping for the string, an error is raised 
[err:FODC0004]." The second case seems like it is the case where the URI 
cannot be resolved. Or is the term "resolved" used with two different meanings 
(looking up the meaning of the URI vs adding it to the base-URI?). Please 
clarify.

Proposed rewording of the relevant section (without taking care of resolve and 
two errors yet since intent not clear):

"Summary: This function takes an xs:string as argument $arg and returns a 
sequence of nodes obtained by interpreting $arg as an xs:anyURI and resolving 
it according to the mapping specified in "Available collections described in 
Section C.2 Dynamic Context Components"XP. 

If $arg is the empty sequence, the function behaves as if it had been called 
without an argument (see below).

If the $arg is a relative xs:anyURI, it is resolved against the value of the 
base-URI property from the static context. If $arg is not a valid xs:anyURI, 
or cannot be resolved, an error is raised [err:FODC0002].

Otherwise, if Available collections provides a mapping from this string to a 
sequence of nodes, the function returns that sequence. If Available 
collections maps the string to an empty sequence, then the function returns an 
empty sequence. If Available collections provides no mapping for the string, 
an error is raised [err:FODC0004]. 

If $arg is not specified, the function returns the sequence of the nodes in 
the default collection in the dynamic context. See Section "C.2 Dynamic 
Context Components"XP. If the value of the default collection is undefined an 
error is raised [err:FODC0002].