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: decide about parameters depending from the document id


Hello,

I want to pass 2 parameters to several files. But which values these
parameters have should depend on the source file. I have a few source
files, for which I want to pass

<xsl:param name="variablelist.term.break.after" select="0"/>
<xsl:param name="variablelist.term.separator">, </xsl:param>

and one, for which I want to pass

<xsl:param name="variablelist.term.break.after" select="1"/>
<xsl:param name="variablelist.term.separator"></xsl:param>

All source files are refentries with an ID. The file for which I want to
pass the latter parameter values is an refentry with the id 'fglrx_4x':

... doctype ...
<refentry id="fglrx_4x" lang="en">
    ...
</refentry>

Now my idea was the following to use in the stylesheet:

> <xsl:template match="refentry">
>   <xsl:choose>
>     <xsl:when test="@id = 'fglrx_4x'">
>       <!-- add linebreak after the term element if more than one is processed -->
>       <xsl:param name="variablelist.term.break.after" select="1"/>
>       <!-- specify the separator between term elements -->
>       <xsl:param name="variablelist.term.separator"></xsl:param>
>     </xsl:when>
>     <xsl:otherwise>
>       <!-- no linebreaks after the term element if more than one is processed -->
>       <xsl:param name="variablelist.term.break.after" select="0"/>
>       <!-- specify the separator between term elements -->
>       <xsl:param name="variablelist.term.separator">, </xsl:param>
>     </xsl:otherwise>
>   </xsl:choose>
>   <xsl:apply-imports/>
> </xsl:template>

But it doesn't work. Can you give me a hint, what is wrong here?

PS: Passing the parameter via command line is not the choice I want here.

Regards, Daniel



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