Given the following XML:
<data>Hello, Apache Foundation!</data>
and the following xtokenizer:
will yield the following result:
Please note that the node <Level2following/> is missing while <Level2preceding/> is included. Since both nodes are a child of <Level1/> the tokenizer should include <Level2following/>, too, since they are a child of a ancestor of the <data/> node which the splitter processes.
The documentation mentions that the mode "w" will include the node in its ancestor content. Strictly speaking, the XPath ancestor would exclude <Level2preceding>. If I understand the XPath spec correctly the current implementation uses ancestor:: | preceding:: as the wrapper which it is a bit counterintuitive.