This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: name() and attribute()
- To: xsl-list at mulberrytech dot com
- Subject: Re: name() and attribute()
- From: Paul Terray <terray at 4dconcept dot fr>
- Date: Wed, 23 Aug 2000 13:54:12 +0100
- Reply-To: xsl-list at mulberrytech dot com
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@4dconcept.fr
tel : 01 34 58 70 76
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list