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 3644 - [F+O] Casting xs:QName and xs:NOTATION to xs:string
Summary: [F+O] Casting xs:QName and xs:NOTATION to xs:string
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Functions and Operators 1.0 (show other bugs)
Version: Candidate Recommendation
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: 2006-08-31 13:28 UTC by Michael Kay
Modified: 2007-02-25 23:33 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2006-08-31 13:28:50 UTC
In 7.1.2, bullet 3 says:

If ST is xs:QName, TV is fn:concat(fn:prefix-from-QName(SV), ":", fn:local-name-from-QName(SV)).

(a) the hyperlinking has gone wrong (editorial)

(b) what if there is no prefix? This would produce the result ":localpart"!

F+O makes it clear that casting xs:NOTATION to xs:string is allowed (always), but doesn't make it clear how it is done. In 17.1.2 it falls through to the bullet "In all other cases, TV is the [XML Schema Part 2: Datatypes Second Edition] canonical representation of SV...", which isn't really good enough.

I suggest we replace the third bullet in 17.1.2 by:

* If ST is xs:QName or xs:NOTATION:
   - if the qualified name has a prefix, TV is the concatenation of the prefix, a colon, and the local-name
   - otherwise TV is the local-name

We could refer to XDM section 3.3.3 for clarification if required.
Comment 1 Andrew Eisenberg 2006-09-15 17:27:09 UTC
The XSL and XML Query WGs considered this issue at their Sept. 12 meeting.

Thw WGs agreed to make the change that you have suggested in (b). We were not clear what you considered wrong in (a), and so will not take any action on this part.

Please close this bug report if you agree with our resolution.
Comment 2 Michael Kay 2006-09-15 17:52:36 UTC
Fine. 

Point(a) was purely editorial: as displayed on my browser the 3rd bullet of 17.1.2 has the text shown within <A>...</A> below marked as a hyperlink, which leads to odd changes in font size and colour. (The link is to the fn:concat function)

If ST is xs:QName, TV is <A>fn:concat(fn:prefix-from-QName(</A>SV), ":", fn:local-name-from-QName(SV)).

I'd suggest hyperlinking each of the function names individually, or none of them.
Comment 3 Jim Melton 2007-02-25 23:33:47 UTC
Closing bug because commenter has not objected to the resolution posted and more than two weeks have passed.