I'm running the following code snippet in CQ:
cts:highlight(
<bogus>This is a test sentence to test this out.</bogus>,
"test",
<searchHit>{fn:upper-case($cts:text)}</searchHit>
)
This results in the following, which makes sense as per the API documentation
for cts:highlight:
<bogus>This is a <searchHit>TEST</searchHit> sentence to
<searchHit>TEST</searchHit> this out.</bogus>
What's confusing me about this is that the evaluation of the third argument to
cts:highlight appears to be deferred until cts:highlight is actually running,
since $cts:text doesn't appear to exist outside of a call to cts:highlight. Is
this a defined part of XQuery or is this MarkLogic-specific?
Thanks,
Alex
NOTICE: This email message is for the sole use of the intended recipient(s)
and may contain confidential and privileged information. Any unauthorized
review, use, disclosure or distribution is prohibited. If you are not the
intended recipient, please contact the sender by reply email and destroy all
copies of the original message.
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general