I realize a forgot to note the last change I made:

 

For HTML and HTML Help commands I created "doc.XXXFile" command similar
to one in PDF transformation scenario and moved the whole "upload"
element there so that I the command initiating the transformation can be
passed the appropriate profiling parameter. 

 

 

  <command name="docb.toHTML2File">

  <process>

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

    <upload base="%1/">

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

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

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

    </upload>

  </process>

</command>

 

pavel

 

 

-----Original Message-----
From: [email protected]
[mailto:xmleditor-support-bounces at xmlmind.com] On Behalf Of Skopik Pavel
Sent: Monday, January 08, 2007 2:59 PM
To: xmleditor-support at xmlmind.com
Subject: [XXE] docbook transformation menu with profiling

 

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/0a9cf235/attachment.htm
 

Reply via email to