[Home] [By Thread] [By Date] [Recent Entries]
Hi Marcus, You can use "indentity transform" based stylesheet (as shown below) conveniently, for creating filters: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" indent="yes" /> <!-- identity transform; copies everything -->
<xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="node() | @*" />
</xsl:copy>
</xsl:template><!-- filter 1 --> <xsl:template match="*[starts-with(name(@*), 'dim1')]" /> <!-- filter 2 ; a priority is attached, otherwise filter 1 and filter 2 rules gets ambiguous --> <xsl:template match="*[@dim1_a = 'yes']" priority="3" /> </xsl:stylesheet> Regards, Mukul On 6/28/06, Marcus Streets <marcus@xxxxxxxxxxx> wrote: I have inherited some XML files that I need to filter. Because i have inherited the files I did not design the way the elements were tagged. But I have to write the xsl to do the filtering - and I am only just dipping my toe into xsl.
|

Cart



