Daniel Dekany wrote:
> When I put something into the clipboard, it will be in an XXE-specific
> format ("<ns:clipboard" etc.), so it's only useful within XXE. (OK,
> except if the selection didn't crossed any element boundaries.) 

* The "<ns:clipboard>" is added only when strictly needed, for example,
when you copy a node range. If you just copy an element, XXE will not
add this wrapper element.

* The XML copied to the clipboard is not indented. Indenting XML means
adding truly ignorable whitespace, therefore it is a costly operation.
When the XML is not indented, you have the choice between putting
everything on one very long line or using what you call ``odd
line-breaks''. We much prefer the ``odd line-breaks''.



> But an
> important goal of the clipboard is to exchange data between different
> applications, so I think it wouldn be more convenient if you put the
> data into the clipboard in two formats: the XXE-specific format with
> MIME type "application/x-java-serialized-object; class=you.know.What",
> and then the selection converted to plain text. The first is possible
> if you create a java.awt.datatransfer.Transferable that supports a
> flavor like `new DataFlavor(you.know.What.class, "XXE")`. And the
> text/plain format shouldn't contain any markup; think about
> copy-pasting into a Word or an e-mail. Actually, it can be quite
> annoying that it doesn't work, once XXE becomes your second "MS Word".
> 

What you say is indeed true. However, what currently does XXE is as
simple and as efficient as possible, and unless a customer pays us
because she/he urgently needs this feature, we are not going to
implement it in the near future.

Workaround: how to copy the selection as plain text:

* If you are a Unix user, use the System Selection to copy and paste
plain text between XXE and other applications.

Selected chars are automatically added to the System Selection (That is,
no need to select Edit|Copy). The contents of the System Selection can
then be pasted by clicking the middle mouse button.

* Otherwise, use command copyChars. See
http://www.xmlmind.com/xmleditor/_distrib/doc/commands/copyChars.html

- This command is currently not bound to a keystroke. You can run it
using "Tools|Execute Command". See "Execute Command" in
http://www.xmlmind.com/xmleditor/_distrib/doc/help/toolsMenu.html

- If you have Professional Edition, you can bind this command to a
keystroke of your choice. See "Add Keyboard Shortcut" in
http://www.xmlmind.com/xmleditor/_distrib/doc/help/optionsMenu.html#customizeConfigurationMenu




> However, you may often want to copy-paste XML markup from XXE edited
> stuff (without all those ns:clipboards and odd line-breaks of course),
> so most certainly a "Edit / Copy XML source" command should exist
> under "Edit / Copy". (I needed this last a lot when working both with
> XXE-edited and non-XXE-edited XML-s at once.)
> 

In fact, you need both "Copy as Plain Text" and "Copy as Indented XML".

If there is sufficient interest, we could implement these commands in
the menu of the Clipboard tool (found at the bottom/right of the main
window. See
http://www.xmlmind.com/xmleditor/_distrib/doc/help/clipboardTool.html).



Reply via email to