RE: [xsl] variable match attribute

Subject: RE: [xsl] variable match attribute
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Fri, 13 Jul 2001 12:13:49 +0100
> <xsl:template match="$pattern">
> 	<!-- do something -->
> </xsl:template>
> I know, the match attribute is a pattern, where I can't use variables
> but how can I solve the problem:
> 'read element names from a document B and use them as template pattern
> in document a'

If the pattern is always a simple element name you can do

<xsl:template match="*">
    <xsl:when test="name()=$pattern">


Otherwise, it might be best to think in terms of generating the stylesheet

Mike Kay
Software AG

 XSL-List info and archive:

Current Thread