Re: name() and attribute()

Subject: Re: name() and attribute()
From: Paul Terray <terray@xxxxxxxxxxxx>
Date: Wed, 23 Aug 2000 13:54:12 +0100
That's what I use, or simpler :
<xsl:if test="@name">blue</xsl:if>

As for name() of an attribute, this would still name(), like in
<xsl:for-each select="./attributes::*">
        <xsl:value-of select="name()"/>
</xsl:for-each>

At 10:36 23/08/00 +0100, you wrote:
...alternatively....

I'm trying to output an attribute only if
if exists; although the below choose block
works, it doesn't really seem like good
practice -- could someone please let me
know what is?

<xsl:choose>
<xsl:when test="@name">blue</xsl:when>
<xsl:choose>

Thanks in advance,
lee



-- Paul Terray - terray@xxxxxxxxxxxx tel : 01 34 58 70 76



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list


Current Thread