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.
Returns all sibling nodes to the right of the cursor position. If the cursor stands currently in text position, this function will return all the sibling nodes subsequent to the current text node.
Returns all sibling nodes to the left of the cursor position. If the cursor stands currently in text position, this function will return all the sibling nodes previous to the current text node.
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.