Jeff Hooker wrote: > > Our Docbook-based CMS allows component-based checkout, but the method used > creates a new level in the directory hierarchy which breaks relative paths. > > I've written a couple of simple XSL scripts that add and then strip the > changes needed to make the documents resolve correctly. Is there a simple way > of running these inside of XMLmind? I'd prefer to just let users trigger them > with buttons on the toolbar, so I've been looking at the various Convert > commands but haven't found a good answer yet. >
* The simplest way to do this is to write a command in Java[tm] (invoked by a toolbar button) which modifies the document being edited. See http://www.xmlmind.com/xmleditor/_distrib/doc/dev/command.html * If you want to use your XSLT style sheets, it is also possible to write a simple macro-command -- http://www.xmlmind.com/xmleditor/_distrib/doc/commands/macro.html -- which: [1] Save the document being edited to disk using "XXE.save [ifNeeded]" -- http://www.xmlmind.com/xmleditor/_distrib/doc/commands/XXE.save.html. [2] Invokes your XSLT scripts by the means of a process command -- http://www.xmlmind.com/xmleditor/_distrib/doc/commands/process.html -- to transform the file containing the document being edited. [3] Uses "XXE.open [reopen]" -- http://www.xmlmind.com/xmleditor/_distrib/doc/commands/XXE.open.html -- to replace the document being edited by the updated one. Something like: --- <command name="applyMyTransform"> <macro> <sequence> <command name="XXE.save" parameter="[ifNeeded]" /> <command name="myTransform" /> <command name="XXE.open" parameter="[reopen]" /> </sequence> </macro> </command> <command name="myTransform"> <process showProgress="false"> <transform stylesheet="myTransform.xslt" file="%D" to="tmp.xml" /> <copy files="tmp.xml" to="%D" /> </process> </command> ---

