This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
In Section 4.4.1 p:xpath-context, the grammar: <p:xpath-context> (p:empty | p:pipe | p:document | p:inline | p:data) </p:xpath-context> 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.
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.
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" and Delete the last paragraph of 4.4.1. Does that clarify the issue?
Yes. Thanks.