[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] not matching empty text nodes.
This is obviously a newbie question.
Say I have <xsl:template match="/album/photos/photo/caption"> <tr valign="top"> <td class="label" align="right">caption:</td> <td class="caption"><xsl:value-of select="." /></td> </tr> </xsl:template> My problem is that I _don't_ want to execute this template if there is no text content in the "caption" element. Another question... how do I provide a one-template solution to all elements which have the same requirements as caption? For instance, there are more of these... <xsl:template match="/album/photos/photo/description"> <tr valign="top"> <td class="label" align="right">description:</td> <td class="caption"><xsl:value-of select="." /></td> </tr> </xsl:template> <xsl:template match="/album/photos/photo/location"> <tr valign="top"> <td class="label" align="right">location:</td> <td class="caption"><xsl:value-of select="." /></td> </tr> </xsl:template> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|