W3C home > Mailing lists > Public > public-qt-comments@w3.org > February 2011

[Bug 11964] New: Function conversion rules and QNames

From: <bugzilla@jessica.w3.org>
Date: Wed, 02 Feb 2011 17:54:46 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-11964-523@http.www.w3.org/Bugs/Public/>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=11964

           Summary: Function conversion rules and QNames
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XPath 3.0
        AssignedTo: jonathan.robie@redhat.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org


The function conversion rules stipulate that when an untypedAtomic value is
supplied by the caller, it is cast to the required type given in the function
signature.

If the required type is namespace-sensitive (e.g. QName) this is probably a bad
idea. 

In 2.0 the cast would fail (the cast could only succeed if the supplied
argument were a string literal, in which case it would not be untypedAtomic). 

In 3.0 it's not obvious whether the cast should be done using the namespaces
from the static context of the caller or that of the callee; in fact, neither
is at all appropriate, since an untypedAtomic value is almost certainly derived
by atomizing an untyped attribute such as xsi:type, and the only appropriate
namespace context to use is that of the node that was atomized.

So I propose changing the function calling rules so the cast from untypedAtomic
to the expected type does not happen if the required type is
namespace-sensitive (that is, QName, NOTATION, or a type derived therefrom, or
a union type with such a type in its membership).

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Wednesday, 2 February 2011 17:54:47 UTC

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