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:choose>
    <xsl:when test="name()=$pattern">

etc.

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

Mike Kay
Software AG


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread