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: Defining an attribute only if not empty


> Now my question is, how can I detect whether an attribute 
> doesnt' have a value (like, say, @id is empty)?

To test whether attribute id exists:
   <xsl:if test="@id">
To test whether attribute id exists and is not zero-length:
   <xsl:if test="string(@id)">

Mike Kay


 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]