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 1240 - [F&O] fn:prefix-from-QName doesn't say what happens when there's no prefix
Summary: [F&O] fn:prefix-from-QName doesn't say what happens when there's no prefix
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-04-12 16:22 UTC by Jeni Tennison
Modified: 2005-04-28 10:04 UTC (History)
0 users

See Also:


Attachments

Description Jeni Tennison 2005-04-12 16:22:46 UTC
It's not clear what you get when you call prefix-from-QName() on an xs:QName
that doesn't have a prefix. The signature of prefix-from-QName() is specified as:

  fn:prefix-from-QName($arg as xs:QName?) as xs:NCNAME?

If prefix-from-QName() returns an empty string if there's no prefix, then the
signature needs to change to:

  fn:prefix-from-QName($arg as xs:QName?) as xs:token?

since an empty string isn't a legal xs:NCName.

The other option would be for prefix-from-QName() to return an empty sequence.
Either way, the spec needs to say what happens.
Comment 1 Jim Melton 2005-04-27 20:03:14 UTC
The original intent in this function was not to return a zero-length string for
the case where there is no prefix, but to return an empty sequence. 

The resolution is: Change the description of function fn:prefix-from-QName to
say explicitly that it will return an empty sequence if the empty sequence is
input ***or if the QName has no prefix***.

Please let us know if you agree with this resolution of your issue, by adding a
comment to the issue record and changing the Status of the issue to Closed. Or,
if you do not agree with this resolution, please add a comment explaining why.
If you wish to appeal the WG's decision to the Director, then also change the
Status of the record to Reopened. If you wish to record your dissent, but do not
wish to appeal the decision to the Director, then change the status of the
record to Closed. If we do not hear from you in the next two weeks, we will
assume you agree with the WG decision.
Comment 2 Jeni Tennison 2005-04-28 10:04:35 UTC
I'm content with the resolution of this issue.