What is the best way to do an intersection with sxpath?
For example with the following XML:
<root>
<a category="cat1">
<b>some text</b>
<b>foo <c>bar</c> baz</b>
</a>
<a category="cat1">
<b>some other text</b>
<b>x <c>y</c> z</b>
</a>
<a category="cat2">
<b>foo <c>bar</c> baz</b>
</a>
</root>
How would you use sxpath to select only b
nodes that have cat1
parents and c
children? That is an sxpath that would return:
((b "foo " (c "bar") " baz")
(b "x " (c "y") " z"))