Bug 21003 - [XPROC10] Errors in 4.4.1 p:xpath-context
Summary: [XPROC10] Errors in 4.4.1 p:xpath-context
Alias: None
Product: XML Processing Model
Classification: Unclassified
Component: Pipeline language (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Norman Walsh
QA Contact:
Depends on:
Reported: 2013-02-15 08:41 UTC by Tim Mills
Modified: 2014-02-19 12:38 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Tim Mills 2013-02-15 08:41:24 UTC
In Section 4.4.1 p:xpath-context, the grammar:

     (p:empty |
       p:pipe |
       p:document |
       p:inline |

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

"Only one connection is allowed..."

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

The later text

"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."

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.
Comment 1 Vojtech Toman 2013-02-27 14:24:00 UTC
I think the "[...]if the context node [...] is unconnected and the default readable port is undefined[...]" 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.
Comment 2 Norman Walsh 2014-02-19 10:55:23 UTC
It is not an error for the connection to be omitted.

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

We propose:

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


Delete the last paragraph of 4.4.1.

Does that clarify the issue?
Comment 3 Tim Mills 2014-02-19 12:38:01 UTC
Yes.  Thanks.