OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: 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


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]