Kevin Flynn wrote:
> I would like to reposition the cursor after running a macro, and would
> expect the following code to do it, but I'm clearly misunderstanding
> something.
> 
>      <cfg:sequence>
> 
>         <cfg:set expression="$dot" variable="saveDot"/>
>         <cfg:set expression="$dotOffset" variable="saveDotOffset"/>
>         <cfg:set expression="$mark" variable="saveMark"/>
>         <cfg:set expression="$markOffset" variable="saveMarkOffset"/>
> 
>         ...main macro code...
> 
>         <cfg:set expression="$saveDot" variable="dot"/>
>         <cfg:set expression="$saveDotOffset" variable="dotOffset"/>
>         <cfg:set expression="$saveMark" variable="mark"/>
>         <cfg:set expression="$saveMarkOffset" variable="markOffset"/>
> 
>       </cfg:sequence>
> 
> What am I doing wrong?

Nothing, except that if the nodes contained in $saveDot and in $saveMark 
have been detached from the document (due to what is done by "main macro 
code"), it is no longer possible to use them to restore the selection.

I highly recommend that you add trace="true" to your macro and that you 
run XXE with a console (On Windows, how to do this is explained here: 
http://www.xmlmind.com/xmleditor/_distrib/docs/dev/ar01s01.html#d0e88).

If you do this, you should have detailed error messages.




Reply via email to