text() Node Test

As discussed in 7.3.2 Import from Document View and XML Text, document view import converts XML text nodes into the special structure jcr:xmltext/jcr:xmlcharacters, importing the actual text into the value of the jcr:xmlcharacters property.

In the virtual XML document against which XPath is run, this structure appears as an element and attribute. For example:

<jcr:xmltext jcr:xmlcharacters="There once was a..."/>

However, as a convenience, the XPath text() node test may be supported in such a way as to make the text also simultaneously visible to XPath in its original form, as an XML text node:

<limerick>There once was a...</limerick>

If the text() node test is supported, the result is simply that text() becomes equivalent to jcr:xmltext as a node test within an XPath statement. For example, the XPaths /jcr:root/limerick/jcr:xmltext and /jcr:root limerick/text() would be equivalent.