> Please provide us with a set of working macro-commands (even if these
> are just mockups calling alert and/or containing comments), so we can
> modify them in order to answer your question.
Sorry for not having them set up in the beginning. Here they are as fully
functional mockups; the condition I am testing for is whether caret is NOT
within the first <listitem> sibling:
<command name="c1">
<macro>
<sequence>
<command name="selectNode"
parameter="ancestorOrSelf[implicitElement] listitem" />
<choice>
<sequence>
<test context="$selected"
expression="boolean(preceding-sibling::*)"/>
<command name="alert" parameter="c1-a"/>
<command name="pass" parameter="c1-a"/>
</sequence>
<sequence>
<command name="alert" parameter="c1-b"/>
<command name="pass" parameter="c1-b"/>
</sequence>
</choice>
</sequence>
</macro>
</command>
<command name="c2">
<macro>
<sequence>
<command name="c1"/>
<command name="alert" parameter="'Result of c1: %_'"/>
<!-- This is where to switch based on the result of c1 -->
<command name="alert" parameter="Remainder of c2"/>
</sequence>
</macro>
</command>
Yves
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support