Subject: Re: [xsl] Re: [xslt transform & grouping] Using the Muenchian Method? From: Anton Triest <anton@xxxxxxxx> Date: Thu, 30 Sep 2004 09:00:49 +0200 |
I still get empty parent nodes that are not filtered, since I left out the info. that attribute filter is also present on the parent node. It can also be empty or contain information.
How can I filter that away as well.
<Documents>
<Document id="0001" filter="">
<Article title="Mr"/>
<Article forename="John" filter="food"/>
<Article surname="Smith" filter=""/>
</Document>
<Document id="0002" filter="food">
<Article title="Dr"/>
<Article forename="Amy" filter=""/>
<Article surname="Jones" filter="food"/>
</Document>
</Documents>
<xsl:template match="*"> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:apply-templates select="*[@filter='food']"/> </xsl:copy> </xsl:template>
<Documents> <Document id="0002" filter="food"> <Article surname="Jones" filter="food"/> </Document> </Documents>
<xsl:stylesheet ...> <xsl:param name="filter" select="'food'"/> ... <xsl:apply-templates select="*[@filter=$filter]"/>
Best regards, Anton
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Re: [xslt transform & gro, Michael PG | Thread | [xsl] How to read/create an xslfo d, Jordi . Miro . Bruix |
RE: [xsl] "normalizing" an XML docu, Oswald Campesato | Date | Re: [xsl] String extraction, Sven Waibel |
Month |