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: Removing tags automatically efter xsl transformation!


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]