[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] passing a variable to call-template


Subject: Re: [xsl] passing a variable to call-template
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 11 Aug 2006 14:24:09 +0100

> So, I'm hoping to be able to dynamically pull templates based upon the
> conformance attribute in the XML.

that's what apply templates does, you want to use apply-templates and
templates with a match pattern not named templates.

just do

<xsl:apply-templates select="@conformance"/>

by default do nothing,

<xsl:template match="@conformance"/>

but sometimes do something

<xsl:template
match="@conformance[starts-with(.,'alert_hand_in_gears')]">
  do something
</xsl:template>


David


Current Thread