<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>5343</bug_id>
          
          <creation_ts>2008-01-03 23:53:46 +0000</creation_ts>
          <short_desc>[XQX] Problem with {{ and }} in a Namespace Declaration Attribute</short_desc>
          <delta_ts>2008-02-14 20:25:58 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XQueryX 1.0</component>
          <version>Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andrew Eisenberg">andrew.eisenberg</reporter>
          <assigned_to name="Jim Melton">jim.melton</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>18195</commentid>
    <comment_count>0</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2008-01-03 23:53:46 +0000</bug_when>
    <thetext>Test case K2-DirectConElemNamespace-76 in XQTS contains the following query:

&lt;e xmlns:p=&quot;{{1}}&quot;/&gt;

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

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


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

&lt;e xmlns:p=&quot;{1}&quot;&gt;&lt;/e&gt;


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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18213</commentid>
    <comment_count>1</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2008-01-04 16:30:54 +0000</bug_when>
    <thetext>This could be solved by changing the template for xqx:namespaceDeclaration from:

  &lt;xsl:template match=&quot;xqx:namespaceDeclaration&quot;&gt;
    &lt;xsl:text&gt; xmlns&lt;/xsl:text&gt;
    &lt;xsl:if test=&quot;xqx:prefix&quot;&gt;
      &lt;xsl:text&gt;:&lt;/xsl:text&gt;
      &lt;xsl:value-of select=&quot;xqx:prefix&quot;/&gt;
    &lt;/xsl:if&gt;
    &lt;xsl:value-of select=&quot;$EQUAL&quot;/&gt;
    &lt;xsl:call-template name=&quot;quote&quot;&gt;
      &lt;xsl:with-param name=&quot;item&quot; select=&quot;xqx:uri&quot;/&gt;
    &lt;/xsl:call-template&gt;
  &lt;/xsl:template&gt;


to the following:

  &lt;xsl:template match=&quot;xqx:namespaceDeclaration&quot;&gt;
    &lt;xsl:text&gt; xmlns&lt;/xsl:text&gt;
    &lt;xsl:if test=&quot;xqx:prefix&quot;&gt;
      &lt;xsl:text&gt;:&lt;/xsl:text&gt;
      &lt;xsl:value-of select=&quot;xqx:prefix&quot;/&gt;
    &lt;/xsl:if&gt;
    &lt;xsl:value-of select=&quot;$EQUAL&quot;/&gt;
    &lt;xsl:call-template name=&quot;quote&quot;&gt;
                  &lt;xsl:with-param name=&quot;item&quot;&gt;
                    &lt;xsl:call-template name=&quot;globalReplace&quot;&gt;
                      &lt;xsl:with-param name=&quot;stringToBeFixed&quot;&gt;
                        &lt;xsl:call-template name=&quot;globalReplace&quot;&gt;
                          &lt;xsl:with-param name=&quot;stringToBeFixed&quot;&gt;
                            &lt;xsl:value-of select=&quot;xqx:uri&quot;/&gt;
                          &lt;/xsl:with-param&gt;
                          &lt;xsl:with-param name=&quot;toBeReplaced&quot;&gt;&lt;xsl:text&gt;{&lt;/xsl:text&gt;&lt;/xsl:with-param&gt;
                          &lt;xsl:with-param name=&quot;replacement&quot;&gt;&lt;xsl:text&gt;{{&lt;/xsl:text&gt;&lt;/xsl:with-param&gt;
                        &lt;/xsl:call-template&gt;
                      &lt;/xsl:with-param&gt;
                      &lt;xsl:with-param name=&quot;toBeReplaced&quot;&gt;&lt;xsl:text&gt;}&lt;/xsl:text&gt;&lt;/xsl:with-param&gt;
                      &lt;xsl:with-param name=&quot;replacement&quot;&gt;&lt;xsl:text&gt;}}&lt;/xsl:text&gt;&lt;/xsl:with-param&gt;
                    &lt;/xsl:call-template&gt;
                  &lt;/xsl:with-param&gt;
    &lt;/xsl:call-template&gt;
  &lt;/xsl:template&gt;

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19029</commentid>
    <comment_count>2</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2008-02-14 01:28:01 +0000</bug_when>
    <thetext>In its face-to-face meetings during 2008-01-21 through 2008-01-23 (minutes
found in member-only email at http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2008Feb/0006.html), the XML Query WG made the decision to correct this error with an entry in the next version of the XQueryX Errata document.  That correction is that shown in comment #1 of this bug.  

We are marking this bug RESOLVED and FIXED.  If you are satisfied with this
resolution, please mark it CLOSED.  If you are not, please add another comment
to this bug explaining your reasons. </thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>