Subject: Re: [xsl] looping through global parameters From: Geert Josten <Geert.Josten@xxxxxxxxxxx> Date: Fri, 12 Nov 2004 22:04:30 +0100 |
Grtz, Geert
Hello List,
I have a stylesheet that defines 2 global parameters: attr and value. The stylesheet has a template that matches all attributes, and if the current attribute name matches the global attr, outputs value.
<xsl:template match="@*" priority="10">
<xsl:attribute name="{name()}">
<xsl:choose>
<xsl:when test="name()=$attr"><xsl:value-of
select="$value"/></xsl:when>
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:template>
Requirements have changed and now the calling process will parse the stylesheet to write a set of global parameters for the values that need to be updated, like so:
<xsl:param name="attr">temporary-directory</xsl:param> <xsl:param name="value">/var/temp</xsl:param> <xsl:param name="attr1">search-local-classes-first</xsl:param> <xsl:param name="value1">false</xsl:param> . . .
Is there a way to loop through the global attributes and call the template for each one?
Thanks,
Ann Marie
-- Geert.Josten@xxxxxxxxxxx IT-consultant at Daidalos BV, Zoetermeer (NL)
http://www.daidalos.nl/ tel:+31-(0)79-3316961 fax:+31-(0)79-3316464
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] looping through global pa, Wendell Piez | Thread | Re: [xsl] looping through global pa, Dimtre Novatchev |
Re: [xsl] looping through global pa, Wendell Piez | Date | RE: [xsl] xsl and toc.hhc (was xml , Michael Kay |
Month |