Draft: draft-ietf-jsonpath-base

Commentary: Editorial improvements Correct ! = comparison involving at least one empty nodelist . 
 I 'm not sure that is so obviously false , so maybe mentioning that a structured value on one side spoils the comparison may be needed . 
 Ok , I can see how someone might read that into the spec . I 'll add something . 
 Please see the comparison examples I just . These should help to draw out the implications of the semantics .
Paragraph (version A):
A singular path by itself in a Boolean context is an existence test
which yields true if the path selects a node and yields false if the
path does not select a node.  To be more specific about the actual
value of a node selected by a path, explicit comparisons are
necessary.  This existence test -- as an exception to the general
rule -- also works with nodes with structured values.
Paragraph (version A):
When a path resulting in an empty nodelist appears on either side of
a comparison, the comparison yields true if and only if the
comparison operator is "==", ">=" or "<=" and the other side of the
comparison is also a path resulting in an empty nodelist.
Paragraph (version A):
structured values compared using "!=".
Paragraph (version A):
comparisons using one of the operators "<", "<=", ">", or ">="
yield true if and only if the comparison is between numeric values
which satisfy the comparison.
Paragraph (version A):
Note that comparisons between structured values, even if the values
are equal, yield false.
Paragraph (version A):
Data types are not implicitly converted in comparisons.  So "13 ==
'13'" yields false.
Paragraph (version B):
A singular path by itself in a Boolean context is an existence test
which yields true if the path selects a node and yields false if the
path does not select a node.  This existence test -- as an exception
to the general rule -- also works with nodes with structured values.
Paragraph (version B):
To test the value of a node selected by a path, an explicit
comparison is necessary.  For example, to test whether the node
selected by the path "@.foo" has the value "null", use "@.foo ==
null" (see null-semantics) rather than the negated existence test
"!@.foo" (which yields false if "@.foo" selects a node, regardless of
the node's value).
Paragraph (version B):
the comparison operator is "!=" and the other side of the
comparison is not also a path resulting in an empty nodelist.
Paragraph (version B):
comparison using one of the operators "==" yields true if and only
if the comparison is between equal primitive values.
Paragraph (version B):
comparisons using one of the operators "<=" or ">=" yield true if
and only if the comparison is between numeric values which satisfy
the comparison.
Paragraph (version B):
any comparison of two values using one of the operators "!=", ">",
"<" is defined as the negation of the comparison of the same
values using the operator "==", "<=", ">=", respectively.
Paragraph (version B):
Note that "==" comparisons between a structured value and any value,
including the same structured value, yield false.  Consequently, "!="
comparisons between a structured value and any value, including the
same structured value, yield true.