<?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>1462</bug_id>
          
          <creation_ts>2005-05-17 18:28:07 +0000</creation_ts>
          <short_desc>sequenceExpr use in XQueryX</short_desc>
          <delta_ts>2005-09-29 09:05:07 +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>All</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="Benjamin Cooperman">bshrom</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>3166</commentid>
    <comment_count>0</comment_count>
    <who name="Benjamin Cooperman">bshrom</who>
    <bug_when>2005-05-17 18:28:07 +0000</bug_when>
    <thetext>Hello, 

What would be a correct XQueryX statement for the following XQuery:
(&quot;FOO&quot;, &quot;BAR&quot;)

According to the XQueryX schema this is valid statement:

&lt;xqx:module 
    xmlns:xqx=&quot;http://www.w3.org/2005/04/XQueryX&quot; 
    xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; 
    xsi:schemaLocation=&quot;http://www.w3.org/2005/04/XQueryX ../xsd/xqueryx.xsd&quot;&gt;
	&lt;xqx:mainModule&gt;
		&lt;xqx:queryBody&gt;
		
            &lt;xqx:expr xsi:type=&quot;xqx:pathExpr&quot;&gt;
                &lt;xqx:argExpr&gt;
                
					&lt;xqx:expr xsi:type=&quot;xqx:sequenceExpr&quot;&gt;
					
						&lt;xqx:expr xsi:type=&quot;xqx:stringConstantExpr&quot;&gt;
							&lt;xqx:value&gt;FOO&lt;/xqx:value&gt;
						&lt;/xqx:expr&gt;
						&lt;xqx:expr xsi:type=&quot;xqx:stringConstantExpr&quot;&gt;
							&lt;xqx:value&gt;BAR&lt;/xqx:value&gt;
						&lt;/xqx:expr&gt;
						
					&lt;/xqx:expr&gt;
					
                &lt;/xqx:argExpr&gt;
            
            &lt;/xqx:expr&gt;

		&lt;/xqx:queryBody&gt;
	&lt;/xqx:mainModule&gt;
&lt;/xqx:module&gt;

However, if you run XQueryX-&gt;XQuery stylesheet transformation it will produce:
(FOO)(BAR).
In the recent release of the stylesheet new for-each cycle have been added to
the template for sequenceExpr, that breakes the conversion. 

  &lt;xsl:template match=&quot;xqx:expr[@xsi:type=&apos;xqx:sequenceExpr&apos;]&quot;&gt;
    &lt;xsl:for-each select=&quot;*&quot;&gt; &lt;!-- NEW --&gt;
      &lt;xsl:call-template name=&quot;paranthesizedList&quot;&gt;
        &lt;xsl:with-param name=&quot;delimiter&quot; select=&quot;$COMMA_NEWLINE&quot;/&gt;
      &lt;/xsl:call-template&gt;
    &lt;/xsl:for-each&gt;  &lt;!-- NEW --&gt;
  &lt;/xsl:template&gt;

Is it a bug or I&apos;m missing something here, below I provided AST for
(&quot;FOO&quot;,&quot;BAR&quot;) in the XML form:

&lt;XPath2&gt;
    &lt;QueryList&gt;
        &lt;Module&gt;
            &lt;MainModule&gt;
                &lt;Prolog/&gt;
                &lt;QueryBody&gt;
                    &lt;Expr&gt;
                        &lt;PathExpr&gt;
                            &lt;ParenthesizedExpr&gt;
                                &lt;Expr&gt;
                                    &lt;PathExpr&gt;
                                        &lt;StringLiteral&gt;&quot;FOO&quot;&lt;/StringLiteral&gt;
                                    &lt;/PathExpr&gt;
                                    &lt;PathExpr&gt;
                                        &lt;StringLiteral&gt;&quot;BAR&quot;&lt;/StringLiteral&gt;
                                    &lt;/PathExpr&gt;
                                &lt;/Expr&gt;
                            &lt;/ParenthesizedExpr&gt;
                        &lt;/PathExpr&gt;
                    &lt;/Expr&gt;
                &lt;/QueryBody&gt;
            &lt;/MainModule&gt;
        &lt;/Module&gt;
    &lt;/QueryList&gt;
&lt;/XPath2&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4359</commentid>
    <comment_count>1</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2005-06-27 01:22:33 +0000</bug_when>
    <thetext>Many thanks for your comment and rather detailed research.  You identified a
newly-introduced bug in the stylesheet, which has been corrected. 

When a new version of the XQueryX spec has been published, we hope that you will
review it and, if it resolves this issue, you will mark the issue CLOSED. 

Jim Melton
On behalf of the XML Query Working Group</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6573</commentid>
    <comment_count>2</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2005-09-29 09:05:07 +0000</bug_when>
    <thetext>Since the commenter has not objected to the solution published in the XQueryX
draft published on 2005-09-15 (two weeks ago today), I am marking this bug
CLOSED. If this is not satisfactory, the commenter may re-open the bug and
explain his reasons. </thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>