Philippe Nobili wrote:
> 
> We have developed XSLT styleheets to convert our own XML dialect into
> DocBook, allowing it to be combined with some other pieces of
> documenation. The stylesheets work fine from command-line with XSLT 2.0
> processors. For convenience reasons, we added a 'Convert' menu in our
> XMLMind configuration for out XML language. The reason it that is is
> more convenient for test purposes than command line transformations.
> 
> So, we added the following lines to our XXE addon (we skipped the
> jxmod.toDocbook command):
> 
>   <command name="jxmod.convertToDocbook">
>     <macro>
>       <sequence>
>          <command name="selectConvertedFile"
>                   parameter='"%{N}_parameters.%{E}"'/>
>          <command name="jxmod.toDocbook"
>                   parameter='"%_"'/>
>       </sequence>
>     </macro>
>   </command>

You cannot specify the suggested save filename without first specifying
which operation is to be performed by selectConvertedFile. See
http://www.xmlmind.com/xmleditor/_distrib/doc/commands/selectFile.html

I would specify:

<command name="selectFile"
         parameter="saveFile %{p}/%{r}_parameters.%{e}"/>

Notice:

* selectFile and not selectConvertedFile. In your case
selectConvertedFile does not seem to be useful.

* An absolute *URL* template %{p}/%{r}_parameters.%{e}, whether the
operation is saveFile or saveFileURL.




I've tested that and it works fine:
---
  <command name="test">
    <macro>
      <sequence>
        <command name="selectFile"
                 parameter="saveFile %{p}/%{r}_parameters.%{e}"/>
      </sequence>
    </macro>
  </command>

  <binding>
    <keyPressed code="F7" />
    <command name="test" />
  </binding>
---



>   <!--
> =================================================================== -->
> 
>   <menu label="_JxMod">
>     <insert/>
>     <separator/>
>     <item command="jxmod.convertToDocbook" label="Convert to DocBook"/>
>   </menu>
> 
> The new menu item is displayed, but dimmed; certainly, we did something
> wrong but we do not understand what...



 
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to