This function is used to evaluate XPath expressions.
It evaluates the given XPath 3.1 expression using the latest Saxon XSLT processor bundled with the application and returns the result. XPath expressions that depend on the cursor location can be successfully evaluated only when the cursor is located in the actual XML content.
expression parameter, which is the XPath expression
to be evaluated. processChangeMarkers parameter, followed by its
value, which can be either true or false
(default value). When you set the parameter to true, the function
returns the resulting text with all the change markers accepted (delete
changes are removed and insert changes are preserved). evaluate parameter, followed by its value, which
can be one of the following:<xi:include> elements are replaced with the actual content that is
referenced. For example, consider the following code
snippet:<article>
<xi:include href="section1.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</article>where section1.xml contains the following
content:<section>
<p>Referenced content</p>
</section>The XPath expression will be executed over the actual content in the
section1.xml file.Example: oxy_xpath Function
para:before{
content:
concat("|Number of words:",
oxy_xpath(
"count(tokenize(normalize-space(string-join(text(), '')), ' '))",
processChangeMarkers,
true),
"| ");
}oxy_xpath() function supports editor variables, as in
the following
example:* {
content:
oxy_concat("Result: ",
oxy_xpath('count(collection("${cfdu}/?select=*.xml"))')
);
}* {
content: oxy_xpath('count(\
collection(\
"${cfdu}/?select=*.xml"))')
}