|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Delete XML Node
Deepak,
At 11:29 AM 11/1/2002, I wrote: Or more simply, if a Y will never have more than one B, you can do Of course the simpler solution to this (doh!) is: <xsl:template match="Y">
<xsl:if test="B[.='ABC'] or C[.='XYZ']">
<Y1>
<xsl:apply-templates select="B[.='ABC'] | C[.='XYZ']"/>
</Y1>
</xsl:if>
</xsl:template>or the analogous logic. Then you need no logic in the B template. Incidentally, this can be further compressed (if you like) as: <xsl:template match="Y[B[.='ABC'] or C[.='XYZ']]">
<Y1>
<xsl:apply-templates select="B[.='ABC'] | C[.='XYZ']"/>
</Y1>
</xsl:template><xsl:template match="Y"/> <!-- this suppresses a Y unless it matches the other template --> Cheers, Wendell
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








