The oxy_xpath() function is used to evaluate XPath expressions.
The oxy_xpath() function has the following signature:
It evaluates the given XPath 2.0 expression using Saxon 9 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. Evaluation fails when the current editing context is inside a referenced xi:include section or inside artificially referenced content (for example, DITA conref or topicref references).
<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 latter will be the actual content in which the XPath expression is executed.
para:before{
content:
concat("|Number of words:",
oxy_xpath(
"count(tokenize(normalize-space(string-join(text(), '')), ' '))",
processChangeMarkers,
true),
"| ");
}