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

From
Kai Hagemeister <>
Date
2005-03-08T13:43:30+00:00
ID
Thread
Re: [docbook-apps] How to generate PHP code in a XSL customizationlayer
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