<?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>20016</bug_id>
          
          <creation_ts>2012-11-20 09:56:22 +0000</creation_ts>
          <short_desc>[XT3TS] accessor-011</short_desc>
          <delta_ts>2012-11-20 15:09:26 +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>XSLT 3.0 Test Suite</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</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="Tim Mills">tim</reporter>
          <assigned_to name="Abel Braaksma">abel.online</assigned_to>
          <cc>mike</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>78522</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2012-11-20 09:56:22 +0000</bug_when>
    <thetext>The expected result should not contain CRLF after the final closing tag.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78524</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-11-20 11:39:06 +0000</bug_when>
    <thetext>I&apos;ve removed the final newline.

However, I don&apos;t think it was wrong. This test uses assert-xml, which is defined like this:

The assertion is true if the result of parsing and canonicalizing the XML given in the body of the assert-xml element is the same (byte-for-byte) as the result of canonicalizing the XML result of the query. As an alternative to canonicalizing, the results may be compared using the fn:deep-equal() function.

Under that definition, the trailing newline should not matter. Admittedly, it becomes a problem when we are comparing XML fragments, but I think that is quite rare and we should probably label those cases specially.

There are actually quite a few tests where you will need to be tolerant of whitespace differences. I&apos;m trying to remove them, but it will take time. I would suggest first doing a comparison as in the spec, and if that fails, attempting a second comparison after stripping whitespace text nodes from both the actual and expected results.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78532</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2012-11-20 14:22:10 +0000</bug_when>
    <thetext>Thanks.  

I&apos;m not clear as to whether assert-xml should serialize out the actual result using the xsl:output options specified in the stylesheet, then re-read it and canonicalize, or should ignore the xsl:output and canonicalize directly.  Can you please advise?

For example, regex-007 has as xsl:output with indent=&quot;yes&quot;.  The expected result has indentation whitespace.

Might I suggest avoiding xsl:output indent=&quot;yes&quot; in stylesheets for tests which are compared with assert-xml, since the whitespace is retained by the canonicalization process.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78533</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-11-20 14:56:14 +0000</bug_when>
    <thetext>This whole area is a bit tricky!

In my test driver, assert-xml looks at the result tree directly, without serializing. The same is true of assert which tests the result tree using XPath expressions. The serialized output is used only for assertions that specifically relate to serialization. 

(I had to do some trickery to achieve this, because it&apos;s possible to have assertions against both the result tree and its serialized form, and Saxon&apos;s normal API only allows you to get one or the other; in fact, if necessary, we do the transformation twice).

I agree that it would be best to avoid using indent=&quot;yes&quot; except in tests where serialization is required. We&apos;re moving in this direction.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78534</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2012-11-20 15:09:26 +0000</bug_when>
    <thetext>We&apos;re doing a similar thing.  Therefore tests such as regex-007 need attention.  I&apos;ll raise a separate bug for this.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>