Hi,

thank you very much! Your solution works perfectly with one or more profiling 
values divied by ";". Nice work really! Now I can see where I was wrong.

Ad [1]
(Does this work with xsl/fo/docbook.xsl? I've no experience yet with
this profile feature.)

No, one has to exactly use the "docbook-profile.xls" or import it to other XSL 
file which is used for transformation, otherwise no profiling is used. 
According to the value specified in the profiling parameter (condition, user 
etc.) the stylesheet selects the profiled content which is then stored in an 
internal node-set and generates the output from the same node-set in specified 
format.

I also use this feature to some extent (where appropriate) for refactoring 
elements such as guibutton, command etc. to indexterms which are then 
automatically added to index. 

Jirak Kosek developed this feature and wrote a nice article about it: 
http://www.xml.com/pub/a/2004/07/14/dbndx.html

Again, thanks a lot for such a great support.

Best regards

pavel







-----Original Message-----
From: Hussein Shafie [mailto:[email protected]] 
Sent: Monday, December 18, 2006 10:59 AM
To: Skopik Pavel
Cc: xmleditor-support at xmlmind.com
Subject: Re: [XXE] macro command for setting value of the the profiling paramter

[1] Added parameter "profile.condition" to <command name="docb.toPS">:

---
<parameter name="profile.condition">%4</parameter>
---
(Does this work with xsl/fo/docbook.xsl? I've no experience yet with
this profile feature.)



[2]  Added "%5" to <command name="docb.toPSFile">:

---
<command name="docb.toPSFile">
  <process>
    <subProcess name="docb.toPS" parameter='"%0" "%1" "%2" "%3" "%5"' />

    <upload base="%4">
      <copyFile file="__doc.%0" to="%4" />
    </upload>
  </process>
</command>
---



[3] Made many changes to <command name="docb.convertToPS">:

---
<command name="docb.convertToPS">
  <macro>
    <sequence>
      <command name="selectConvertedFile"
               parameter="saveFileURLWithExtension=%0" />
      <set variable="selectedFile" expression="%_" plainString="true" />

      <command name="prompt" parameter="'Profile' 'Profile:'" />
      <get expression="concat('&quot;', $selectedFile, '&quot; &quot;',
                              '%_', '&quot;')" />

      <command name="docb.toPSFile"
               parameter='"%0" "%1" "%2" "%3" %_' />
    </sequence>
  </macro>
</command>
---



(Everything I did is contained in the attachment. My modifications are
based on the xslMenu.incl found in (not yet released) XXE 3.5.1. However
there is not much differences with the one in 3.5.0.)



Skopik Pavel wrote:
> 
> I would like to be able to specify the value of the profiling parameter
> interactively before envoking the transformation process which should be
> possible according to a earlier posting in this mailing list.
> 
>  
> 
> I created this macro command which prompts a dialog window and the user
> is asked to type the appropriate value.
> 
>  
> 
>  
> 
> <command name="profile">
> 
>     <macro>
> 
>       <sequence>
> 
>         <command name="prompt" parameter="'Profilov?n?' 'Vlo?te hodnotu'"/>
> 
>  
> 
>         <get expression="%_"/>
> 
>       </sequence>
> 
>     </macro>
> 
>   </command>
> 
>  
> 
>  
> 
> Then I set up the "profile.condition" parameter which I use for
> profiling in DocBook.
> 
>  
> 
>        <parameter name="profile.condition">%_</parameter>
> 
>  
> 
>  
> 
> After that I included the prompt command inside the "docb.convertToPS"
> command.
> 
>  
> 
> <command name="docb.convertToPS">
> 
>     <macro>
> 
>       <sequence>
> 
>         <command name="profile"/>
> 
>         <command name="selectConvertedFile"
> 
>                  parameter="saveFileURLWithExtension=%0"/>
> 
>  
> 
>         <command name="docb.toPSFile" parameter='"%0" "%1" "%2" "%3" "%_"'>
> 
>       </sequence>
> 
>     </macro>
> 
> </command>
> 
>  
> 
>  
> 
> At this point the transformation gets done, but the profiling option
> does not filter the content and leaves the PDF file empty with no text
> in it.
> 
>  
> 
> I realize that the problem is related to variables use and at this point
> I am running out of ideas (knowledge J). Is it possible just to solve
> this with using the variables the right way or should be the whole macro
> command rebuilt?
> 

Reply via email to