Aleksi Kallio wrote:
> I am doing this:
>
> <xsl:apply-templates select="field[contains(input/@name, 'title')]" />
> <xsl:apply-templates select="field[not (contains(input/@name,
> 'title'))]" />
>
> Ie. I first apply templates to field-elements that satisfy a given
> condition and then to rest of them. Condition will get very long and
> complex.
>
> What's the easiest way to modularize the condition, to avoid duplicating
> it?
You can store it in a variable
<xsl:variable ame="condition" select="contains..." />
and then use
<xsl:apply-templates select="field[$condition]" >
I think
--
Martin Honnen
http://JavaScript.FAQTs.com/