poster wrote:
>>For example: this one will work for docbook's listitem.
>>
>>---
>> <command name="moveListItemUp">
>> <macro undoable="true">
>> <sequence>
>> <command name="selectNode"
>> parameter="ancestorOrSelf[implicitElement]
>>listitem callout step" />
>> <match context="$selected" pattern="*[position() > 1]" />
>> <set variable="anchor" context="$selected"
>> expression="./preceding-sibling::*[1]" />
>> <command name="cut" />
>> <set variable="selected" expression="$anchor" />
>> <command name="paste" parameter="before" />
>> </sequence>
>> </macro>
>> </command>
>>---
>
>
> This is where it suddenly balloons. Writing a fragment of code using XML
> syntax, editing config files, is very painful. A scripting language (like
> jRuby) would say this very simply (and I have not even looked for
> improvements):
>
> Command(:moveListItemUp, :undoable=>true) {
> selectNode ancestorOrSelf(implicitElement), listitem, callout, step
> match $selected, {position > 1}
> anchor = $selected.preceding_sibling
> cut
> $selected = anchor
> paste
> }
>
> This macros could simply be put into a standard directory. XXE loads it
> dynamically from this directory, looks it up dynamically by name, puts it
> onto menus dynamically by name. Macros can be structured using the features
> of the scripting language. Absolutely no need to _have_ to edit
> configuration files. It makes customization _so_ much easier. Wrapping XML
> syntax around a fragment of code makes it much less approachable, not
> easier.
OK, I understand now.
--> You don't need a scripting language which could rival Java in
extending XXE.
--> You would like to use a scripting language to write XXE
configurations and macros, because:
* The XML syntax makes XXE configuration files tedious to write (using a
text editor).
* The scripting language, with its variables, loops and conditionals,
would make configurations and macros at the same time more powerful and
easier to write.
* You could use the auto-load features commonly found in many scripting
languages.