Hi, Just for clarification. What I am looking for is similar to <command name="copyChars" parameter="[separateNodes]"/> But instead of including a linefeed, I would need a simple space.
Thanks, Roman -----Urspr?ngliche Nachricht----- Von: Hussein Shafie [mailto:hussein at xmlmind.com] Gesendet: Mittwoch, 19. M?rz 2008 10:21 An: Huditsch, Roman (LNG-VIE) Cc: xmleditor-support at xmlmind.com Betreff: Re: [XXE] copyChar in conjunction with replace Huditsch, Roman (LNG-VIE) wrote: > > I now came up with another problem, I couldn't solve. > I need to copy the current text selection (going over different > elements) > to the clipboard (just the text). > No problem so far. I could do this with > <cfg:command name="copyChars" parameter="%_"/> > But how do I manage to replace all "." in this selection with ". "? > I tried different ways with get and set, but with no success. > > Do you have any hint on how to solve this? <binding> <keyPressed code="F3" /> <command name="Test" /> </binding> <command name="Test"> <macro> <sequence> <test expression="string-length($selectedChars) > 0 and contains($selectedChars, '.')" /> <get expression="replace($selectedChars, '\.', '. ')" /> <command name="paste" parameter="to %_" /> </sequence> </macro> </command> * $selectedChars documented in http://www.xmlmind.com/xmleditor/_distrib/doc/commands/selection_vars.html * replace() documented in http://www.xmlmind.com/xmleditor/_distrib/doc/commands/xpathextfunc.html (string-length() and contains() are standard XPath 1 functions.) * paste documented in http://www.xmlmind.com/xmleditor/_distrib/doc/commands/paste.html

