[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Removing tags automatically efter xsl transformation!


Subject: RE: [xsl] Removing tags automatically efter xsl transformation!
From: "Oleg Tkachenko" <olegt@xxxxxxxxxxxxx>
Date: Tue, 7 Aug 2001 15:31:04 +0200

Hello Uwe !

> I want to remove tags like <tag/> (without any child and string-length of
> zero) from my output. I'm transforming xml-files to different formats. In
> some I don't want to have "empty" tags.
> 
> Has someone an idea or a solution?

What about the folowing:

<xsl:template match="*[not(node())]"/>

+ you need to care about whitespace only containing nodes, like
<tag>
</tag>

---
Oleg Tkachenko
Multiconn International


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



Current Thread