[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] Keeping the Current Context
Subject: Re: [xsl] Keeping the Current Context
From: Niko Matsakis <niko@xxxxxxxxxxxxx>
Date: Thu, 27 Mar 2003 11:30:42 -0500
|
Replace
<xsl:template match="columns/column">
<xsl:call-template name="getRules">
<xsl:with-param name="ruleName" select="'v_E_D_type'" />
</xsl:call-template>
<xsl:call-template name="getRules">
<xsl:with-param name="ruleName" select="'v_E_S_type'" />
</xsl:call-template>
<xsl:call-template name="getRules">
<xsl:with-param name="ruleName" select="'v_E_php_1_id'" />
</xsl:call-template>
</xsl:template>
with
<xsl:template match="columns/column">
<xsl:variable name="context" select="."/>
<xsl:for-each select="document ('rulenames.xml')//rulename">
<xsl:variable name="rulename" select="string(.)"/>
<xsl:for-each select="$context">
<xsl:call-template name="ruleName" select="$rulename"/>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
Perhaps there is a more elegant solution, but that springs to mind
immediately.
niok
--
DataPower technology
http://www.datapower.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|