|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Understanding Identity Transformations
Given the following XML: <DATA> <FOO cat="BLUE"></FOO> <FOO cat="BLUE"></FOO> <FOO cat="RED"> <FOO cat="PINK"></FOO> <FOO cat="GREEN"></FOO> <FOO cat="BLUE"></FOO> </FOO> <FOO cat="BLUE"></FOO> <FOO cat="YELLOW"></FOO> <FOO>on you!</FOO> </DATA> This: <xsl:template match="@* | node()"> <xsl:copy> <xsl:apply-templates select="@*"/> <xsl:apply-templates /> </xsl:copy> </xsl:template> <xsl:template match="*[@cat][not(@cat='BLUE')]"/> Produces: <DATA> <FOO cat="BLUE" /> <FOO cat="BLUE" /> <FOO cat="BLUE" /> <FOO>on you!</FOO> </DATA> I don't want the <FOO>on you!</FOO> match. However, I don't understand how the root element was picked up, I figured it would be ignored resulting in no results.
|
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








