XPointer string functions
There are some basic string matching capabilities through this function:
The basic syntax is:
The first argument is a location from which the document to be searched for the matching string. The second argument is the actual string to search for. The index argument must be a positive number to start after the beginning of the match. The length argument can specify how many characters to include in the range. If the last two arguments are not specified, then all characters are assumed to require processing.
This example finds all occurrences of the string Boeing767:
The first argument can specify what nodes you want to look in. For example, this finds all occurrences of the string Boeing767 in the UNITED elements:
This example finds only the first occurrence of the string Boeing737 in the document:
This final position is immediately before the word Boeing737 in the document’s UNITED element. This is not the same as pointing at the entire UNITED element as an
A third argument, which is numeric, targets a particular position within the string. This example targets the point between the l and ‘g’ in the first occurrence of the string Boeing737 because ‘g’ is the sixth letter:
32 The XML Files: Development of XML/XSL Applications Using WebSphere Studio