This works for me :
import module namespace search = "http://marklogic.com/appservices/search" at "/MarkLogic/appservices/search/search.xqy"; declare namespace ROC100CP="ROC100CP" ; let $query := cts:and-query(cts:element-value-query(fn:QName("ROC100CP", "Applicable"), "Yes", ("case-insensitive","punctuation-insensitive","lang=en"), 1), ()) let $query:= <q>{$query}</q> return $query//cts:element/text()? Thanks Pragya ________________________________ From: [email protected] <[email protected]> on behalf of Kapoor, Pragya <[email protected]> Sent: Tuesday, May 12, 2015 4:09 PM To: MarkLogic Developer Discussion Subject: [MarkLogic Dev General] Get element name from cts:and-query Hi, Is it possible to find the name of the element from cts:and-query/cts:or-query? for example: Query:= cts:and-query(cts:element-value-query(fn:QName("ROC100CP", "Applicable"), "Yes", ("case-insensitive","punctuation-insensitive","lang=en"), 1), ()) Output : ROC100CP:Applicable? Thanks Pragya "This e-mail and any attachments transmitted with it are for the sole use of the intended recipient(s) and may contain confidential , proprietary or privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this e-mail or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful." "This e-mail and any attachments transmitted with it are for the sole use of the intended recipient(s) and may contain confidential , proprietary or privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this e-mail or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful."
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
