[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Attempting *not* to copy certain nodes
Hi,
I'm brand new to XSLT but not to XHTML, CSS, etc. So far I'm in love with XSLT's promise, but still pretty confused by its syntax. I've been using Firebird's built-in XSLT processor: XSLT Processor VersionVendor: TransformiixVendor URL: http://www.mozilla.org/projects/xslt/ I'm trying *not* to copy certain nodes in a modified SOAP file: <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="RemoveRequestError.xslt"?> <MapSecuritiesResult> <Security> <Outcome>RequestError</Outcome> <Message>No match found for this security identifier.</Message> <Identity>Header</Identity> <Delay>7.90625</Delay> <Symbol>AA^</Symbol> </Security> <Security> <Outcome>Success</Outcome> <Delay>0</Delay> <CIK>0001099290</CIK> <Cusip>00371F206</Cusip> <Symbol>AAC</Symbol> <Name>ABLEAUCTIONS COM INC</Name> <Market>AMEX</Market> <CategoryOrIndustry /> </Security> <Security> <Outcome>Success</Outcome> <Delay>0</Delay> <CIK>0000004611</CIK> <Cusip>024591109</Cusip> <Symbol>ABL</Symbol> <Name>American Biltrite Inc</Name> <Market>AMEX</Market> <CategoryOrIndustry>Fabricated Plastic & Rubber</CategoryOrIndustry> </Security> ... </MapSecuritiesResult> I want to copy the <Security> nodes in which the Outcome was Success and want not to copy the ones in which the Outcome was Request Error. The XSLT file I've used is based on an earlier discussion on this list: http://www.biglist.com/lists/xsl-list/archives/200307/msg01390.html <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="Root"> <xsl:apply-templates select="MapSecuritiesResult"/> </xsl:template> <xsl:template match="Security"> <xsl:copy> <xsl:apply-templates select="Outcome[Success]"/> </xsl:copy> </xsl:template> </xsl:stylesheet> Obviously, it's not working or I wouldn't be asking for help. Sorry if I've not searched the FAQ properly. I have attempted to do so, and also to Google to the best of my understanding of the relevant terms. Brett 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
|