<?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>21003</bug_id>
          
          <creation_ts>2013-02-15 08:41:24 +0000</creation_ts>
          <short_desc>[XPROC10] Errors in 4.4.1 p:xpath-context</short_desc>
          <delta_ts>2014-02-19 12:38:01 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Processing Model</product>
          <component>Pipeline language</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>ASSIGNED</bug_status>
          <resolution></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="Norman Walsh">ndw</assigned_to>
          <cc>vojtech.toman</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>83178</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2013-02-15 08:41:24 +0000</bug_when>
    <thetext>In Section 4.4.1 p:xpath-context, the grammar:

&lt;p:xpath-context&gt;
     (p:empty |
       p:pipe |
       p:document |
       p:inline |
       p:data)
&lt;/p:xpath-context&gt;

indicates that exactly one connection is permitted.  This appears to be 
confirmed by the text:

&quot;Only one connection is allowed...&quot;

It is not specified what error should be raised if a connection is omitted.

The later text

&quot;In an XPath 1.0 implementation, if the context node is connected to 
p:empty, or is unconnected and the default readable port is undefined, 
an empty document node is used instead as the context. In an XPath 2.0 
implementation, the context item is undefined.&quot;

seems to suggest that the connection can be omitted.  It hints that the 
xpath-context behaves like a primary input port, but this is not 
explicitly stated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83803</commentid>
    <comment_count>1</comment_count>
    <who name="Vojtech Toman">vojtech.toman</who>
    <bug_when>2013-02-27 14:24:00 +0000</bug_when>
    <thetext>I think the &quot;[...]if the context node [...] is unconnected and the default readable port is undefined[...]&quot; bit in the last paragraph of section 4.4.1 (p:xpath-context) applies to the situation when p:xpath-context is *not* used and p:choose/p:when thus must use the default readable port for establishing the context node.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100872</commentid>
    <comment_count>2</comment_count>
    <who name="Norman Walsh">ndw</who>
    <bug_when>2014-02-19 10:55:23 +0000</bug_when>
    <thetext>It is not an error for the connection to be omitted.

The last paragraph of 4.4.1 may be confusing because it&apos;s describing a situation that can&apos;t actually occur (if you have a p:xpath-context item, then you can&apos;t *not* have one).

We propose:

In the penultimate paragraph of 4.4.0, replace &quot;If no explicit connection is provided&quot; with &quot;If no p:xpath-context is provided&quot;

and

Delete the last paragraph of 4.4.1.

Does that clarify the issue?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100884</commentid>
    <comment_count>3</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2014-02-19 12:38:01 +0000</bug_when>
    <thetext>Yes.  Thanks.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>