[Bug 2260] [xqueryx] namespace attributes

http://www.w3.org/Bugs/Public/show_bug.cgi?id=2260

           Summary: [xqueryx]  namespace attributes
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQueryX
        AssignedTo: jim.melton@acm.org
        ReportedBy: davidc@nag.co.uk
         QAContact: public-qt-comments@w3.org


Currently a namespace declaration on a direct element constructor such as
<a xmlns:x="a"></a>
is encoded using

               <xqx:attributeConstructor>
                  <xqx:attributeName xqx:prefix="xmlns">x</xqx:attributeName>
                  <xqx:attributeValue>a</xqx:attributeValue>
               </xqx:attributeConstructor>

There is a certain amount of history as to why namespace declarations use
xml attribute syntax, but that history doesn't apply here. These are not
attributes to the XPath/Xquery data model, and they have a radically different
effect on the static context.  xmlns: isn't a prefix in the currently known
namespaces, so it's a misuse of the xqx:QName type to represent xmlns:x as
a Qname with prefix xmlns.

XqueryX should have a separate xqx:namespaceName
xqx:namespaceValue construct to generate the namespace binding.

the schema declaration for xqx:attributeName should have a pattern facet
restricting the name not to be xmlns or begin with xmlns:

David

Received on Friday, 16 September 2005 12:55:54 UTC