Kevin Flynn wrote: > I am trying to use the process commands to create an interactive function > that runs an XSL transformation on the whole of the currently edited > document. However, I can't quite do it because it is not possible to paste > the transformation results back into the document. > > It seems that it is in general not possible to paste over the document root > element. This can be tested as follows: > > 1 Open a document > 2 Select the root element > 3 Copy > 4 Paste > > The status of the document does NOT change to "modified". > > I tried inserting a "delete force" statement before my paste, but it doesn't > help.
Currently, XXE is designed to edit the content of the root element, not the document containing it. If you select the root element, you'll notice that all commands except Copy are disabled (grayed icons, etc). (If it is not the case, this is a bug.) > I also tried modifying my transformation to output only first-level > children, and selecting all children of the root before pasting, but this > doesn't work either - I think because two of the child elements are external > entity references. > > I could run two transformations, one to generate the elements before the > external entities, and one to generate the elements after, then paste in the > before and after segments separately. This seems a bit clunky, though. Is > there a better way around it? Yes, write a macro-command combining your process command and XXE.open. See http://www.xmlmind.com/xmleditor/_distrib/docs/commands/ch06s60.html Not great, but better than nothing.

