Custom Action XPath
Posted: Wed Jun 13, 2012 4:38 pm
I've created an action using the InsertOrReplaceFragmentOperation. Whereby the user highlights a selection of text and marks up a link. However the schema contraints are that the <link/> tag cannot be nested.
So far I've not been able to work out the XPath to prevent the action from nesting the <link/> tag. I've used "self:para[not(descendant::link)]" but this doesn't work as a link may or may not be already present in the para.
So the question is how do I run the xpath on the selected text? Or do I need to write a custom action which extends the InsertOrReplaceFragmentOperation?
Code: Select all
<para>
The quick brown fox jumped over the <link>lazy</link> dog.
</para>
So the question is how do I run the xpath on the selected text? Or do I need to write a custom action which extends the InsertOrReplaceFragmentOperation?