[Home] [By Thread] [By Date] [Recent Entries]
On 2/21/07, stephan@xxxxxxxxxx <stephan@xxxxxxxxxx> wrote:
Hi there,
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- identity template --> <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> <!-- no-op template --> <xsl:template match="listitem[formatinfo][count(child::*) = 1]"/> </xsl:stylesheet> The "identity template" traverses the source tree copying each node to the result tree. The "no-op" template overrides the generic identity template for nodes that it matches, and it doesn't copy the nodes - hence "no-op". In this case, the no-op template will only suppress <listitem>'s with a single <formatinfo> - if you need it to do more then post back. cheers andrew
|

Cart



