The xpath() Function

This function has one signature:

The following example counts the number of words from a paragraph and displays the result in front of it:

para:before{ content: concat("|Number of words:", xpath("count(tokenize(normalize-space(string-join(text(), '')), ' '))"), "| "); }