<?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>17707</bug_id>
          
          <creation_ts>2012-07-06 12:05:42 +0000</creation_ts>
          <short_desc>fn-unparsed-text-023</short_desc>
          <delta_ts>2013-03-20 10:55:00 +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>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</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="Michael Kay">mike</reporter>
          <assigned_to name="Tim Mills">tim</assigned_to>
          <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>69677</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-07-06 12:05:42 +0000</bug_when>
    <thetext>Test fn-unparsed-text-023 has an environment that explicitly sets the static base URI to &quot;undefined&quot;; it then uses a relative URI in the call to unparsed-text(), and expects an error code of XPST0001. A number of other tests in the unparsed-text() family are similar.


Several problems.

 (a) the documentation/schema says that the magic value is &quot;##undefined&quot; rather than &quot;#UNDEFINED&quot;. I have changed the schema to match the instances.

 (b) there&apos;s nothing that requires a processor to be able to set the static base URI to &quot;undefined&quot;. In Saxon, for example, the base URI defaults to the current working directory. The test therefore has a dependency which needs to be documented.

 (c) even if the static base URI is undefined, I&apos;m not sure a static error is appropriate. The spec of XPST0001 says &quot;If analysis of an expression relies on some component of the static context that has not been assigned a value, a static error is raised [err:XPST0001].&quot;. But the analysis of this expression doesn&apos;t depend on knowing the static base URI; it is only the execution that relies on it (static base URI is used only if the supplied URI is relative, which is not known until execution time). (The debate on static base URI versus dynamic Base URI is relevant here).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69678</commentid>
    <comment_count>1</comment_count>
    <who name="O&apos;Neil Delpratt">oneil</who>
    <bug_when>2012-07-06 13:32:07 +0000</bug_when>
    <thetext>Hi Tim, I am assigning this bug entry to you.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69679</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2012-07-06 13:40:05 +0000</bug_when>
    <thetext>
&gt;  (b) there&apos;s nothing that requires a processor to be able to set the static
&gt; base URI to &quot;undefined&quot;. In Saxon, for example, the base URI defaults to the
&gt; current working directory. The test therefore has a dependency which needs to
&gt; be documented.

How would you like this to be documented?  i.e. do you want a &lt;dependency&gt; element e.g.

&lt;dependency type=&quot;feature&quot; value=&quot;canHaveUndefinedBaseURI&quot; /&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69681</commentid>
    <comment_count>3</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2012-07-06 13:58:31 +0000</bug_when>
    <thetext>This test was written following the examples for fn:doc.  See for example:

   &lt;test-case name=&quot;K2-SeqDocFunc-4&quot;&gt;
      &lt;description&gt; Invoke fn:doc with a relative, Unix-like URI. Since it&apos;s relative, and the base-uri may be undefined, XPST0001 is allowed. &lt;/description&gt;
      &lt;created by=&quot;Frans Englich&quot; on=&quot;2007-11-26&quot;/&gt;
      &lt;test&gt;doc(&quot;/example.com/example.org/does/not/exist/doesNotExist/works-mod.xml&quot;)&lt;/test&gt;
      &lt;result&gt;
         &lt;any-of&gt;
            &lt;error code=&quot;FODC0002&quot;/&gt;
            &lt;error code=&quot;XPST0001&quot;/&gt;
         &lt;/any-of&gt;
      &lt;/result&gt;
   &lt;/test-case&gt;

While I see your point, I&apos;m not inclined to change the expected result unless all tests expecting XPST0001 are reviewed.  And if it were to be changed, to what code would you suggest?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82364</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2013-01-30 22:16:02 +0000</bug_when>
    <thetext>Any further comments or would you be happy to close?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84721</commentid>
    <comment_count>5</comment_count>
    <who name="O&apos;Neil Delpratt">oneil</who>
    <bug_when>2013-03-20 10:55:00 +0000</bug_when>
    <thetext>I think we can closed this bug now.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>