<?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>9290</bug_id>
          
          <creation_ts>2010-03-22 15:36:34 +0000</creation_ts>
          <short_desc>wrong XQueryX tests - difference in dealing with newlines</short_desc>
          <delta_ts>2010-06-15 13:18:12 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Query Test Suite</product>
          <component>XML Query Test Suite</component>
          <version>1.0.2</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc>http://zorba-xquery.com</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="Daniel Turcanu">daniel.turcanu</reporter>
          <assigned_to name="Andrew Eisenberg">andrew.eisenberg</assigned_to>
          <cc>jim.melton</cc>
          
          <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>33748</commentid>
    <comment_count>0</comment_count>
    <who name="Daniel Turcanu">daniel.turcanu</who>
    <bug_when>2010-03-22 15:36:34 +0000</bug_when>
    <thetext>Some XQueryX tests have the results differ from the XQuery correspondend, because of different processing of new line. 
In XQueryX test, the XSL transformation changes the newline to &amp;#xA; and this makes the result to not match the expected one.

The failing tests are:
XQueryX/Expressions/Construct/DirectConElem/DirectConElemAttr/Constr-attr-ws-1
XQueryX/Expressions/Construct/DirectConElem/DirectConElemAttr/Constr-attr-ws-2

Testing was performed with Zorba XQuery 1.1 .</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34554</commentid>
    <comment_count>1</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2010-04-05 16:19:44 +0000</bug_when>
    <thetext>Daniel, I&apos;ve looked at test case Constr-attr-ws-1 and I do not see a problem.

The xquery for this test case is:

&lt;elem attr=&quot;
&quot;/&gt;

I see OD and 0A characters for the content of the attribute. The expected result is:

&lt;elem attr=&quot; &quot;/&gt;

This attribute contains just a space character.

The XQueryX that has been generated for this test case includes:

          &lt;xqx:attributeConstructor&gt;
            &lt;xqx:attributeName&gt;attr&lt;/xqx:attributeName&gt;
            &lt;xqx:attributeValue&gt; &lt;/xqx:attributeValue&gt;
          &lt;/xqx:attributeConstructor&gt;

xqx:attributeValue contains a space character. Evaluating this XQueryX should produce the expected result.


Perhaps I have misunderstood you in some way.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>35382</commentid>
    <comment_count>2</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2010-05-03 22:03:48 +0000</bug_when>
    <thetext>Daniel, if I don&apos;t receive any further information from you, then I will have to close this bug report without making any changes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>35507</commentid>
    <comment_count>3</comment_count>
    <who name="Daniel Turcanu">daniel.turcanu</who>
    <bug_when>2010-05-07 15:22:42 +0000</bug_when>
    <thetext>AFAIK In xml the whitespaces between tags are ignored, if there are only whitespaces.
So the space inside &lt;xqx:attributeValue&gt; &lt;/xqx:attributeValue&gt; gets ignored, and xslt transforms it into &lt;elem attr=&quot;&quot;/&gt;.
This is with the latest XQTS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>35539</commentid>
    <comment_count>4</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2010-05-10 20:05:29 +0000</bug_when>
    <thetext>I believe that the space in xqx:attributeValue must be retained. Section 2, Mapping the XQuery Syntax, of XQueryX says:

&quot;The XQueryX semantics are defined by a stylesheet that maps an instance of XQueryX to an instance of XQuery; see B Transforming XQueryX to XQuery.&quot;
 
The following declarations appear at the beginning of xqueryx.xsl:

  &lt;xsl:output method=&quot;text&quot;/&gt;
  &lt;xsl:strip-space elements=&quot;*&quot;/&gt;
  &lt;xsl:preserve-space elements=&quot;xqx:value xqx:attributeValue xqx:pragmaContents
                                xqx:optionContents xqx:xquery&quot;/&gt;


Section 4.4, Stripping Whitespace from a Source Tree, of XSLT 2.0 says:

&quot;The set of whitespace-preserving element names is specified by xsl:strip-space and xsl:preserve-space  declarations. Whether an element name is included in the set of whitespace-preserving names is determined by the best match among all the xsl:strip-space or xsl:preserve-space declarations: it is included if and only if there is no match or the best match is an xsl:preserve-space element.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36027</commentid>
    <comment_count>5</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2010-06-07 16:48:48 +0000</bug_when>
    <thetext>Once again, Daniel, if I don&apos;t receive any further information from you, then I will have to close this bug report without making any changes.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>