Re: [docbook-apps] How to generate PHP code in a XSL customizationlayer

From
Roberto Gianassi <>
Date
2005-03-08T17:38:34+00:00
ID
Thread
Re: [docbook-apps] How to generate PHP code in a XSL customizationlayer
Kai Hagemeister wrote:
Hello
Robert,
  

  

  

  When profile.lang is equal to "it" I would
like to generate something equivalent to this:
    

    

<xsl:processing-instruction name="php">
    

include ('../php/filename_it.php');
    

</xsl:processing-instruction>
    

    

while profile.lang is equal to "en" this:
    

    

<xsl:processing-instruction name="php">
    

include ('../php/filename_en.php');
    

</xsl:processing-instruction>
    

  
  

without reading carefully your other posts I would suppose that this is
an easy task. It's a condition isnt it?
  

You can do this with:
  

   <xsl:choose>
  

    <xsl:when test="foo">
  

       ...
  

     </xsl:when>
  

    <xsl:otherwise>
  

       ...
  

    </xsl:otherwise>
  

    </xsl:choose>
  

Kai
  

  

  

Yes, it's an easy task, but is complicated by the
fact that files are processed 2 times: the first one for profiling and
the second one for building the site.

The problem is that I pass the profile.lang property when I do the
first pass. At the second pass I don't know what to test for in the
customization layer.

I will make some experiments.

Thanks to all!

-- 

 Firma 

 Eng. Roberto Gianassi 

 http://www.roberto.gianassi.name