ligasgr / intellij-xquery

Plugin to support XQuery in Intellij Idea
Apache License 2.0
35 stars 23 forks source link

Support MarkLogic cts:highlight built-in variables #214

Open willsthompson opened 7 years ago

willsthompson commented 7 years ago

https://docs.marklogic.com/cts:highlight

When invoking cts:highlight one can reference any of 5 built-in variables. These variables don't need to be declared, but they are currently treated as unresolved in the IDE.

For example:

cts:highlight(doc('foo.xml'), 
  "Bar", 
  if (count($cts:queries) gt 1)
  then xdmp:set($cts:action, "continue")
  else <match position="{ $cts:start }">{ $cts:node }</match>)

To my knowledge, the built-in variables are not available anywhere outside of the immediate context of cts:highlight.