[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Matching empty tags

Subject: Matching empty tags
From: "Araquel, Ed E." <Araquel.Ed@xxxxxxxx>
Date: Tue, 31 Aug 1999 10:11:22 -0500
xsl empty tag
A small newbie question here:

How do I match an empty tag such as <TD/> so that I can do a transformation
on it. I would like it to be in the following template form but it doesn't
seem to work:

<xsl:template match="TD">
	<xsl:choose>
		<xsl:when test=".=''">
			<TD><xsl:text> </xsl:text></TD>
		</xsl:when>
		<xsl:otherwise>
			<xsl:copy>
				<xsl:apply-templates
select="@*|*|text()|comment()"/>
			</xsl:copy>
		</xsl:otherwise>
	</xsl:choose>
</xsl:template>

What I'm trying to do is convert any <TD/> tags into <TD>space
character</TD> Is this possible?

--
Ed Araquel

Mayo Foundation
200 1st St. SW - Siebens 7
Rochester, Minnesota
55905
(507) 538-1023



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.