I have an additional-query specified in my options to search:search. I need
to specify a search if an element exists in the XML, but I want to discard
that as a search if the element does not exist. Specifically I have an
expiration date for content and initially I have had additional-query
specified like this:
<additional-query>
{
cts:and-query((
cts:element-range-query(xs:QName("publicationDate"), "<=",
fn:current-date()),
cts:element-range-query(xs:QName("expirationDate"), ">=",
fn:current-date()),
cts:not-query(cts:element-query(xs:QName("preview"), "true"))
))
}
</additional-query>
Is there a way to remove the expirationDate element-range-query if there is
no expirationDate in the document?
TIA for any suggestions,
Steve
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general