Checking absence of attribute with cts:query
问题 I have an XML fragment where I want to have different queries based in the existence of the id attribute: <author order="1" id="99999999" initials="A." given-names="Able" surname="Baker" fullname="Able Baker"/> I have tried: let $first-query := if ($first) then cts:or-query(( cts:element-attribute-word-match(xs:QName("author"), xs:QName("given-names"), $first || "*", ("collation=http://marklogic.com/collation/codepoint")), cts:element-attribute-word-match(xs:QName("author"), xs:QName(