xsl-list
[Top] [All Lists]

Re: xsl:if / variables / fancy / confusing

2005-11-17 15:17:34
I was thinking:

<select name="attribute_{attribute_id}">
<xsl:if test="/configuration/details/errors/attribute_{attribute_id}"><xsl:attribute name="style">xyz</xsl:attribute></xsl:if>

but it doesn't like that AT ALL.

Hi Johnathon,

You cannot use attribute value templates within attributes that are expected to contain XPath expressions themselves. Not a very nice solution, but you could use:

<xsl:if test="/configuration/details/errors/*[local-name() = concat('attribute_', 
attribute_id)]">
  <xsl:attribute name="style">xyz</xsl:attribute>
</xsl:if>

Regards,
Geert

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>