Hi Folks, A few days ago David Carlisle posted
a message with an excellent analysis of several XPath expressions. His message got me to thinking: It’s really easy to write XPath expressions that yield
false positives. Stated differently,
it’s really hard to write correct XPath expressions. [Definition]
False positive: a test result which incorrectly indicates that a particular condition or attribute is present. Example of a Condition:
The <B> element is empty. Will the following XPath correctly indicate when the condition is present?
normalize-space(B) eq '' Evaluating the XPath expression on the following XML correctly indicates that the condition is present. <Row> Evaluating the XPath expression on the following XML correctly indicates that the condition is not present. <Row> Evaluating the XPath expression on the following XML
incorrectly indicates that the condition is present. <Row> Evaluating the XPath expression produces a false positive. Evaluating the XPath expression on the following XML
incorrectly indicates that the condition is present. <Row> Evaluating the XPath expression produces a false positive. /Roger |