<?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>29221</bug_id>
          
          <creation_ts>2015-10-21 16:43:23 +0000</creation_ts>
          <short_desc>[XSLT30] fn:unparsed-entity-uri and fn:unparsed-entity-public-id mention a second error code but do no define one</short_desc>
          <delta_ts>2015-10-29 12:42:30 +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>Last Call 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>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Abel Braaksma">abel.braaksma</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>123828</commentid>
    <comment_count>0</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2015-10-21 16:43:23 +0000</bug_when>
    <thetext>The first para under Rules for this pair of functions reads:

&gt;Calling the single-argument form of this function has the same effect as 
&gt;calling the two-argument form with the context item as the second argument, 
&gt;except that a different error code is used in error situations.

However, this &quot;different error code&quot; is not defined. Moreover, the only error code (XTDE1370 and XTDE1380 resp.) are written in such a way that they can only apply to the one-argument version of the functions.

I propose to either 

(a) update the error texts and first paragraph to reflect the new two-argument signatures, or 

(b) to add the mentioned extra errors, something along those lines:

Error for unparsed-entity-uri:

&lt;proposal&gt;
[ERR XTDE1371] It is a dynamic error if the two-argument form of the unparsed-entity-uri function is called with the root of the tree of the node given in the second argument is not a document node.
&lt;/proposal&gt;

Error for unparsed-entity-public-id:

&lt;proposal&gt;
[ERR XTDE1381] It is a dynamic error if the two-argument form of the unparsed-entity-public-id function is called with the root of the tree of the node given in the second argument is not a document node.
&lt;/proposal&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123842</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-10-22 11:03:26 +0000</bug_when>
    <thetext>I propose we use the wording from the element-with-id() function which has similar rules:

A dynamic error is raised [XTDE1370/XTDE1380] if $node, or the context item if the second argument is omitted, is a node in a tree whose root is not a document node.

The following errors may be raised when $node is omitted:

If the context item is absent, dynamic error [err:XPDY0002]
If the context item is not a node, type error [err:XPTY0004]

This is an incompatible change to the error code from XSLT 2.0, but since 2.0 could not catch errors and the codes were non-normative anyway, this isn&apos;t a big deal.

Note that XQuery is considering changing the XPDY0002 condition to a static error in cases where it can be detected statically.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123873</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-10-22 22:18:56 +0000</bug_when>
    <thetext>The change was accepted and has been applied.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>