Philippe Nobili wrote:
>
> We have a totally different question: could it be possible to search
> and replace a text wrapped within an element ?; I give an example:
>
> 1) We write the documentation of a product named "MyProduct"; when it's
> done, we have "MyProduct" text patterns all over the place
>
> 2) Then we decide to replace all occurences of "MyProduct" by (for
> instance) "<productname>MyProduct</productname>".
>
> This is much faster than doing this when writing the documentation (also
> because the wrapping element can be a reference to an IDentified element
> in another document, for exemple the official product's list, and thus
> be not straightforward to pick).
>
> Is there a convenient way to do this within XMLMind,
When I need to do this, I record a macro. For example, here's a macro
I've recorded (Tools|Macro|View) which:
[1] Find, and thus select, string "ditac" (using the Search tool).
[2] Convert selected text to element cmdname (using the Edit tool).
[3] Move to next text node (Press Tab).
---
<command name="COMMAND_NAME_HERE"
xmlns="http://www.xmlmind.com/xmleditor/schema/configuration"
xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/"
xmlns:ns="http://www.w3.org/1999/xlink"
xmlns:ns2="http://www.w3.org/1998/Math/MathML">
<macro undoable="true"
repeatable="false"
trace="false">
<sequence>
<command name="search"
parameter="[is] ditac"/>
<command name="convert"
parameter="[implicitElement] cmdname"/>
<command name="moveDotTo"
parameter="nextTextNode"/>
</sequence>
</macro>
</command>
---
After recording the macro (Esc m to start recording, Esc m to stop
recording). I then press "Esc p" repeatedly to perform all the
replacements. (More info.
http://www.xmlmind.com/xmleditor/_distrib/doc/help/toolsMenu.html#recordMacroMenu)
Note that it is possible to bind last recorded macro to a keystroke.
This is done by using "Options|Customize Configuration|Add Keyboard
Shortcut". (More info.
http://www.xmlmind.com/xmleditor/_distrib/doc/help/com.xmlmind.xmleditapp.kit.part.AddKeyboardShortcutDialog.html)
> or could it be a possible development for future versions ?
This is not planned because we find the above facility convenient enough
for most needs.