I am trying to add a menu item for an additional transform for DocBook.
I am almost fully successful; the only problem I am having is in opening
the resulting output file.  To do this, I have defined two commands: one
is the actual process which performs the translations, and the other
asks the user for the output filename, calls the translation, and
(should) display the result.  My motivation for this approach has been a
combination of both examples at the end of the "command" section of the
power user documentation.

In particular, I had thought that the "read" process element would set
"%_" (because it seems that that is what the "toSimpara" command does in
example 1), and I had thought that XXE.edit opens a new file view on its
parameter (if not already open).  When I run/select my command, though,
the most recent line of the command history indicates that the "read"
took place, but says nothing about the edit.

It's not entirely clear to me what exactly "read" should do given the
documentation ("Loads the contents of specified text file").  Loads it
to where?  Does it or does it not set %_?  If so, to what?

I've included my configuration file so that you can see the details.
Alternate approaches to the same end would be welcome.

Thanks,

    John L. Clark
-------------- next part --------------
<?xml version="1.0" encoding="UTF-8"?>
<cfg:configuration name="DocBook"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xs="http://www.w3.org/2001/XMLSchema";
xmlns:cfg="http://www.xmlmind.com/xmleditor/schema/configuration";>
  <cfg:include location="docbook/docbook.xxe" system="true" />
  <cfg:command name="docbook.translateChanges">
    <cfg:process>
      <cfg:copyDocument to="in.xml"></cfg:copyDocument>
      <cfg:transform file="in.xml" stylesheet="xsl/change.xsl" 
to="out.xml"></cfg:transform>
      <cfg:upload base="file:///">
        <cfg:copyFile file="out.xml" to="%0" />
      </cfg:upload>
      <cfg:read file="%0" />
    </cfg:process>
  </cfg:command>
  <cfg:command name="docbook.integrateVersioning">
    <cfg:macro>
      <cfg:sequence>
        <cfg:command name="selectFile" parameter="saveFile" />
        <cfg:command name="docbook.translateChanges" parameter="&#34;%_&#34;" />
        <cfg:command name="XXE.edit" parameter="&#34;%_&#34;" />
      </cfg:sequence>
    </cfg:macro>
  </cfg:command>
  <cfg:menu label="DocBook" mnemonic="D">
    <cfg:insert />
    <cfg:item command="docbook.integrateVersioning"
    label="Merge Internal Changes" mnemonic="M"></cfg:item>
  </cfg:menu>
</cfg:configuration>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20031112/cd571d05/attachment.sig
 

Reply via email to