Subject: RE: Simplified production for FilterExpr in XPath spec? From: Jukka.T.Lehtinen@xxxxxxxxx Date: Tue, 18 Jul 2000 11:33:18 +0300 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Simplified production for Filte, Kay Michael | Thread | Multiple ifs (Was: RE: Simplified p, Jeni Tennison |
RE: problem generating dynamic name, Kay Michael | Date | Re: Simplified production for Filte, Paul Tchistopolskii |
Month |