Hello, 

 

in case anyone is interested, I created a variant of "Convert document"
menu for DocBook configuration which can be used for transforming
documents with profiling parameters. 

 

This menu is based on earlier posting by Hussein 
http://www.xmlmind.com/pipermail/xmleditor-support/2006-December/004836.
html, where he kindly provided a solution for passing profiling
parameter to a transformation command for PDF output by means of
prompting user for its value.

 

The only thing I did was extending this feature to other transformation
commands as well. So the resulting config file (which is included) is
almost the exact copy of the original xslMenu.incl with these
differencies:

 

*       Added the "profile.condition" parameter which is default and can
be changed.

*       Order of variables is changed in commands used for
transformation to HTML and HTML Help.

*       Command "docb.toHTMLHelp" was taken from the "Customized
configuration for the DocBook DTD" and added here.

*       All paths use "xxe-config" prefix.

 

In case one uses more than one profiling parameter (e.g. userlevel and
condition together), it is possible to add another parameter and the
user is prompted twice.

 

<command name="docb.toHTML2">

...

 

<parameter name="profile.condition">%0</parameter>

<parameter name="profile.userlevel">%1</parameter>

 

...

</command>

 

 

<command name="docb.toHTML2File">

  <process>

    <subProcess name="docb.toHTML2" parameter='"%0" "%1"' />

    <upload base="%2/">

        <copyFiles files="*.*" toDir="." />

        <copyFiles files="resources/*" toDir="resources" />

        <copyFiles files="images/*" toDir="images" />

    </upload>

  </process>

</command>

  

 

The first parameter (condition) is temporarily stored in $param
variable.

 

  <command name="docb.convertToHTML2">

    <macro>

      <sequence>

         <command name="selectConvertedFile" 

                  parameter="saveDirectoryURL" />

         <set variable="selectedFile" expression="%_" plainString="true"
/>

       <command name="prompt" parameter="'Profile condition' 'Profiling
parameter:'" />

       

       <set variable="param" expression="%_" plainString="true" />

       

       <command name="prompt" parameter="'Profile userlevel' 'Profiling
parameter:'" />

       

       <get expression="concat('&quot;', $param, '&quot; &quot;', '%_',
'&quot; &quot;', 

                              $selectedFile, '&quot;')" />        

         <command name="docb.toHTML2File" parameter='%_' />

      </sequence>

    </macro>

  </command>

 

 

Greetings

pavel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20070108/2efc6ac1/attachment.htm
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xslMenu-profiling1.incl
Type: application/octet-stream
Size: 22787 bytes
Desc: xslMenu-profiling1.incl
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20070108/2efc6ac1/attachment.dll
 

Reply via email to