<?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>28153</bug_id>
          
          <creation_ts>2015-03-06 11:08:05 +0000</creation_ts>
          <short_desc>[XT30] document function</short_desc>
          <delta_ts>2015-10-29 09:50:32 +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</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>http://www.w3.org/TR/xslt-30/#func-document</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="Michael Kay">mike</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>118390</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2015-03-06 11:08:05 +0000</bug_when>
    <thetext>The description of the handling of the $uri-sequence argument to fn:document() needs to be revised, since items in this sequence may be other than a node or atomic value.

For easy of implementation, and clarity of error conditions, would it not make sense to state that this argument is atomized before any processing occurs, and that any errors caused by failure to atomize would be those defined for fn:data?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>118392</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-03-06 13:15:10 +0000</bug_when>
    <thetext>Thanks for pointing it out. I think it can be fixed simply by s/atomic value/item/ in the third bullet:

If $uri-sequence (after atomizing any nodes) contains an atomic value of a type other than xs:string, xs:anyURI, or xs:untypedAtomic then a type error is raised [ERR XPTY0004]

Atomizing the supplied sequence doesn&apos;t work, because the rules for resolving a relative URI are different for nodes and for atomic values.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>118566</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-03-12 18:05:28 +0000</bug_when>
    <thetext>The WG accepted the proposed fix.

The text has been changed to read:

&lt;p&gt; If &lt;code&gt;$uri-sequence&lt;/code&gt; (after atomizing any nodes) contains an 
&lt;phrase diff=&quot;chg&quot; at=&quot;S-bug28153&quot;&gt;item other than an atomic value of type&lt;/phrase&gt; &lt;code&gt;xs:string&lt;/code&gt;, &lt;code&gt;xs:anyURI&lt;/code&gt;, or
&lt;code&gt;xs:untypedAtomic&lt;/code&gt; then a type error is raised &lt;xerrorref spec=&quot;XP&quot; class=&quot;TY&quot; code=&quot;0004&quot;/&gt;. &lt;/p&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>