tags:

views:

16

answers:

0

How can I programmatically determine if XPath expression A always will match something when XPath expression B matches something, in other words that B implies A?

By "matching something" I mean that the result is a non-empty set of nodes, so this is boolean XPath matching.

Examples:

/Fruits/Apples implies /Fruits

/Fruits implies /Fruits|Vegetables