I'm trying to create the cts equivalent of essentially this:
//(a|b|c|d|e|f|g)[@attr = $val]
But it seems like I would have join multiple cts:search()s, one for each
element, since I only want the matching element, and not its parent (so I can't
do something like cts:search(//(a|b|c|d|e|f|g),
cts:element-attribute-value-query((xs:QName("a"),...,(xs:QName("g")),xs:QName("attr"),$val)).
cts:search(//a,
cts:element-attribute-value-query(xs:QName("a"),xs:QName("attr"),$val))
| cts:search(//b,
cts:element-attribute-value-query(xs:QName("b"),xs:QName("attr"),$val))
| cts:search(//c,
cts:element-attribute-value-query(xs:QName("c"),xs:QName("attr"),$val))
...
| cts:search(//g,
cts:element-attribute-value-query(xs:QName("g"),xs:QName("attr"),$val))
Is there a better way to do this?
Thank you!
-Will
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general