<?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>2257</bug_id>
          
          <creation_ts>2005-09-16 11:06:27 +0000</creation_ts>
          <short_desc>[xqueryx]  brace groups in element content.</short_desc>
          <delta_ts>2005-09-26 22:51:27 +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>Last Call drafts</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="David Carlisle">davidc</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>6315</commentid>
    <comment_count>0</comment_count>
    <who name="David Carlisle">davidc</who>
    <bug_when>2005-09-16 11:06:28 +0000</bug_when>
    <thetext>Currently (15th september)
the stylesheet puts a brace group around each item in the content
of a direct element constructor. It should not do this if the item is itself a
direct element constructor, ie the xsl:if tests below should be added.

  &lt;xsl:template match=&quot;xqx:elementContent&quot;&gt;
    &lt;xsl:for-each select=&quot;*&quot;&gt;
      &lt;xsl:if test=&quot;not(self::xqx:elementConstructor)&quot;&gt;
         &lt;xsl:value-of select=&quot;$LBRACE&quot;/&gt;
      &lt;/xsl:if&gt;
      &lt;xsl:apply-templates select=&quot;.&quot;/&gt;
      &lt;xsl:if test=&quot;not(self::xqx:elementConstructor)&quot;&gt;
        &lt;xsl:value-of select=&quot;$RBRACE&quot;/&gt;
      &lt;/xsl:if&gt;
  &lt;/xsl:for-each&gt;
  &lt;/xsl:template&gt;


Without this change XqueryX can not express the equivalent of
&lt;y&gt;&lt;z xmlns:a=&quot;a&quot;/&gt;&lt;/y&gt;
the nearest it can get is
&lt;y&gt;{&lt;z xmlns:a=&quot;a&quot;/&gt;}&lt;/y&gt;

But these are not equivalent:

  declare copy-namespaces no-preserve,no-inherit;
  &lt;y&gt;&lt;z xmlns:a=&quot;a&quot;/&gt;&lt;/y&gt;

evaluates to

 &lt;y&gt;&lt;z xmlns:a=&quot;a&quot;/&gt;&lt;/y&gt;


but


  declare copy-namespaces no-preserve,no-inherit;
  &lt;y&gt;{&lt;z xmlns:a=&quot;a&quot;/&gt;}&lt;/y&gt;

evaluates to

 &lt;y&gt;&lt;z/&gt;&lt;/y&gt;

as the copy-namespace declaration has no effect on the directly embedded
element constructor in the first example, but does affect (prohibit)
the copying of the namespace when the sequence constructed by the
enclosed expression is copied in the second example.

David</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6353</commentid>
    <comment_count>1</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2005-09-20 09:57:07 +0000</bug_when>
    <thetext>Thanks for reporting this problem.  We will investigate it and produce a
solution for a revised XQueryX stylesheet. </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6459</commentid>
    <comment_count>2</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2005-09-26 21:11:36 +0000</bug_when>
    <thetext>We have made the change that you proposed. 

Please let us know if you agree with this resolution of your issue, by adding a
comment to the issue record and changing the Status of the issue to Closed. Or,
if you do not agree with this resolution, please add a comment explaining why.
If you wish to appeal the WG&apos;s decision to the Director, then also change the
Status of the record to Reopened. If you wish to record your dissent, but do not
wish to appeal the decision to the Director, then change the Status of the
record to Closed. If we do not hear from you in the next two weeks, we will
assume you agree with the WG decision.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6466</commentid>
    <comment_count>3</comment_count>
    <who name="David Carlisle">davidc</who>
    <bug_when>2005-09-26 22:51:27 +0000</bug_when>
    <thetext>thanks</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>