W3C home > Mailing lists > Public > public-qt-comments@w3.org > April 2005

[Bug 1240] New: fn:prefix-from-QName doesn't say what happens when there's no prefix

From: <bugzilla@wiggum.w3.org>
Date: Tue, 12 Apr 2005 16:22:46 +0000
To: public-qt-comments@w3.org
Message-Id: <E1DLOA2-0004GC-KQ@wiggum.w3.org>


           Summary: fn:prefix-from-QName doesn't say what happens when
                    there's no prefix
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Functions and Operators
        AssignedTo: ashok.malhotra@oracle.com
        ReportedBy: jeni@jenitennison.com
         QAContact: public-qt-comments@w3.org

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.
Received on Tuesday, 12 April 2005 16:22:47 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:23 UTC