Hello,

I got the following problem:
- I wanna split an element to insert another elmenent
- avoid the split when the cursor is on the first or last position 
inside the element to split (because a split in this situation results 
an element without content) .. instead I want to use the insert after/ 
before command
- the idea was to use the dotSelected variable and the string-length() 
to check if the cursor is in the first or last position of my element 
content

                    <sequence>
                        <pass>
                            <command name="selectNode" 
parameter="self[implicitElement] 
{http://www.xmlmind.com/xmleditor/schema/ELearning/schema}Emphasis"/>
                            <test expression="($dotOffset &gt; 0) and 
($dotOffset &lt; string-length($dot))"/>
                            <command name="split" 
parameter="[implicitElement]"/>
                            <command name="insert" 
parameter="before[implicitElement] 
{http://www.xmlmind.com/xmleditor/schema/ELearning/schema}InternetLink"/>
                        </pass>
                    </sequence>

this is my pass section. 
<http://dict.leo.org/se?lp=ende&p=lURE.&search=unfortunately>
this works fine as long as I click from "outside" the Emphasis element 
in it. But when I enter this element by moving the cursor in it seems 
like that the dotSelected variable is set only once at the beginning of 
the content of the Emphasis element to 0.

I know thats only a littlelittle problem ... but maybe there is a solution.

thanks a lot
christian



Reply via email to