Peter.Schulte at gad.de wrote: >> Do not hesitate to suggest the tool you need to solve your problem (a >> way to test in a macro if a node is editable?). We'll try to implement >> it in next release. > > What I would like to have is a "reference-enabling" of the command "cut". > My suggestion is an additional optional parameter for this command such > like "useReferenceIfPossible" (You will find a better term.). So I could > simply call the cut-command with this parameter and later on I could > call the paste-command, which is already able to paste references. If > the cut finds a marked reference then it would copy the reference to the > clipboard otherwise the marked node or just plain text. > The copy command could get the same additional parameter. The > functionality would be a little bit different from copyAsInclusion. > The latter command explicitly marks the clipboard content as being a > reference. > > What do you think about that?
We agree with you. If we have enough time, we'll implement "cutInclusionEnabled", a variant of command "cut", in next release 3.1. Otherwise, it will be added to the release after 3.1. Command "cutInclusionEnabled" will work as plain command "cut" except that if it cuts an element included from an external document (e.g. a chapter included in a book), it will copy a reference (and not plain XML nodes) to the clipboard. Unlike current behavior, we feel that this is what the user expects XXE to do. Moreover, XXE will do for new command "cutInclusionEnabled" what it does for command "pasteInclusionEnabled" (http://www.xmlmind.com/xmleditor/_distrib/doc/commands/pasteInclusionEnabled.html): When XXE starts, it registers command "pasteInclusionEnabled" as "paste". Therefore, when you think you use command "paste", in fact, you use command "pasteInclusionEnabled".

