[Bug 5343] [XQX] Problem with {{ and }} in a Namespace Declaration Attribute

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

           Summary: [XQX] Problem with {{ and }} in a Namespace Declaration
                    Attribute
           Product: XPath / XQuery / XSLFO / XSLT
           Version: Recommendation
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQueryX
        AssignedTo: jim.melton@acm.org
        ReportedBy: andrew.eisenberg@us.ibm.com
         QAContact: public-qt-comments@w3.org


Test case K2-DirectConElemNamespace-76 in XQTS contains the following query:

<e xmlns:p="{{1}}"/>

The XQueryX generated by the XQuery 1.0 applet for this query is:

<?xml version="1.0"?>
<xqx:module xmlns:xqx="http://www.w3.org/2005/XQueryX"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://www.w3.org/2005/XQueryX
                                http://www.w3.org/2005/XQueryX/xqueryx.xsd">
  <xqx:mainModule>
    <xqx:queryBody>
      <xqx:elementConstructor>
        <xqx:tagName>e</xqx:tagName>
        <xqx:attributeList>
          <xqx:namespaceDeclaration>
            <xqx:prefix>p</xqx:prefix>
            <xqx:uri>{1}</xqx:uri>
          </xqx:namespaceDeclaration>
        </xqx:attributeList>
      </xqx:elementConstructor>
    </xqx:queryBody>
  </xqx:mainModule>
</xqx:module>


The application of our xqueryx.xsl stylesheet to this XQueryX generates the
following:

<e xmlns:p="{1}"></e>


This generated query was recently determined to be invalid (see Bug #5083).

I suggest that the xqueryx.xsl stylesheet needs to be changed. I note that the
template for xqx:attributeConstructor converts { and } to {{ and }},
respectively. The template for xqx:namespaceDeclaration does not do this.

Received on Thursday, 3 January 2008 23:53:49 UTC