How do you fetch records that contain a node that is a prefix to a string you are searching for?
XML looks like this:
<records>
<record>
<name>foo</name>
<prefix>abc</prefix>
</record>
<record>
<name>bar</name>
<prefix>def</prefix>
</record>
<record>
<name>bar</name>
<prefix>abc.123</prefix>
</record>
</records>
So if I have string “abc.123.xyz”, I would fetch the first and third records.
Roughly translated to “/records/record[prefix[is-contained-in?(‘abc.123.xyz’)]]”
Any XPath functions that I see work the other way around (starts-with, contains), where you specify the substring instead of the node containing the substring.
This matches record nodes in your sample:
substring-before