Exact Positioning of Custom Content

Sometimes the current context node information is not enough to achieve the exact positioning of Custom Content. For example, when the cursor stands between two emphasis elements in a para, or when the cursor is just before the first para, or just after the last para, the context node is still the same, i.e. para.

To bypass this limitation Custom Content adds two custom functions which can be used in XSLT patterns and XPath position expressions.

For example, if you specify "Insert Before" and XPath location expression cc:nodes-after()[self::emphasis][2], Custom Content will try to insert your content just before the second emphasis to the right of the current position.