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]
Other format: [Raw text]

Re: find out if an attribute exist


At 10:11 AM 5/7/2002, you wrote:
>I need to do one thing if a specific attribute exists on an element and
>something else if it does not.  How do I do this?

<xsl:choose>
   <xsl:when test="element/@attribute">
     do one thing
   </xsl:when>
   <xsl:otherwise>
     do something else
   </xsl:otherwise>
</xsl:choose>



Greg Faron
Integre Technical Publishing Co.



 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]