This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: name() and attribute()


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]