This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Simplified production for FilterExpr in XPath spec?
- To: xsl-list at mulberrytech dot com
- Subject: RE: Simplified production for FilterExpr in XPath spec?
- From: Jukka dot T dot Lehtinen at nokia dot com
- Date: Tue, 18 Jul 2000 11:33:18 +0300
- Reply-To: xsl-list at mulberrytech dot com
Hi, another newbie question:
I have element with some attributes and with attribute values
(in my source), example:
<sem role="error">
<sem role="user">
...
and i want to change attribute name and value of attribute to
something else. Example:
(<sem role="error"> --> <sem type="state">
This is what I have tried:
<xsl:template match="sem">
<sem>
<xsl:attribute name="type">
<xsl:if test="sem[@role='user']">state</xsl:if>
<xsl:if test="sem[@role='error']">parameter</xsl:if>
<xsl:if test="@role">doesnt work</xsl:if>
</xsl:attribute>
<xsl:apply-templates/>
</sem>
</xsl:template>
But that "sem[@role='user']" doesnt work, am I away from right answer ??
Appreciate help you can give.
Jukka.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list