<?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>14831</bug_id>
          
          <creation_ts>2011-11-15 08:24:46 +0000</creation_ts>
          <short_desc>[QT3TS] parse-xml and serialize tests</short_desc>
          <delta_ts>2012-08-10 09:55:45 +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>XQuery 3 &amp; XPath 3 Test Suite</component>
          <version>Member-only Editors 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="O&apos;Neil Delpratt">oneil</assigned_to>
          <cc>jim.melton</cc>
    
    <cc>mike</cc>
    
    <cc>oneil</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>60039</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2011-11-15 08:24:46 +0000</bug_when>
    <thetext>Many of these tests make a call to

unparsed-text(&quot;../docs/atomic.xml&quot;)

but the environment is empty.

I suggest rewriting the tests to use (for example)

unparsed-text(&quot;http://www.w3.org/fots/docs/atomic.xml&quot;)

and reference the &quot;atomic&quot; environment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60098</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2011-11-17 10:57:41 +0000</bug_when>
    <thetext>I can see why you would like this, so that unparsed-text() mirrors the way doc() is handled in the specs, but at present the spec of the two functions is different: doc() uses a mapping of URIs to resources in the static context, whereas unparsed-text() lacks this indirection: the spec is written to require direct resolution of the URI supplied. So I think this is a spec issue, not a test issue - the tests as written reflect the spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60099</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2011-11-17 11:02:17 +0000</bug_when>
    <thetext>Should I raise this against the spec?

It would be a bit strange if

doc($uri)

is markedly different from

parse-xml(unparsed-text(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60444</commentid>
    <comment_count>3</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2011-11-24 16:58:54 +0000</bug_when>
    <thetext>The fn:serialize tests actually use fn:doc, not fn:unparsed-text so need the fix I suggested.

   &lt;test-case name=&quot;serialize-xml-001&quot;&gt;
        &lt;description&gt;serialize test&lt;/description&gt;
        &lt;created by=&quot;ONeil Delpratt, Saxonica&quot; on=&quot;2010-10-05&quot;/&gt;
        &lt;environment name=&quot;empty&quot;/&gt;
        &lt;test&gt;serialize(doc(&apos;../docs/atomic.xml&apos;))&lt;/test&gt;
        &lt;result&gt;
            &lt;assert&gt;contains($result,&apos;atomic&apos;)&lt;/assert&gt;
        &lt;/result&gt;
    &lt;/test-case&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68003</commentid>
    <comment_count>4</comment_count>
    <who name="O&apos;Neil Delpratt">oneil</who>
    <bug_when>2012-05-22 10:05:43 +0000</bug_when>
    <thetext>Most of these tests have been rewritten.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68424</commentid>
    <comment_count>5</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2012-05-31 14:50:20 +0000</bug_when>
    <thetext>The tests

serialize-xml-005
serialize-xml-007
serialize-xml-009

each use a serialization parameter document which is invalid with respect to the schema.

I expect the fn:serialize function to follow the process described in &quot;3.1 Setting Serialization Parameters by Means of a Data Model Instance&quot; at:

https://www.w3.org/XML/Group/qtspecs/specifications/xslt-xquery-serialization-30/html/Overview.html#serparams-in-xdm-instance

Thus setting a parameter will necessitate lax validation, and therefore each of these tests should expect SEPM0017.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71421</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-07-25 02:23:30 +0000</bug_when>
    <thetext>For tests serialize-xml-005 and serialize-xml-009 I have changed the error code from SEPM0016 to SEPM0017 as suggested.

For test serialize-xml-007 I have anticipated the changes discussed by the WG today: it is expected that the schema will be changed to permit unrecognized elements in a &quot;foreign&quot; namespace but disallow those in the standard output namespace. I split the test into two to cover both cases.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72022</commentid>
    <comment_count>7</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2012-08-10 09:55:45 +0000</bug_when>
    <thetext>Confirmed fixed.  Thanks.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>