|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Attempting *not* to copy certain nodes
3rett 3onfield wrote:
...<MapSecuritiesResult> <Security> <Outcome>RequestError</Outcome> 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 The "indent" attribute has no effect for text output. There is no node named "Root" in your XML source.<xsl:template match="Root"> <xsl:apply-templates select="MapSecuritiesResult"/> </xsl:template>
Try
<?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="/">
<xsl:copy-of select="Security[Outcome='Success']"/>
</xsl:template>
</xsl:stylesheet>
which should be a bit closer to your expectations. This provides literal
copies of all Security elements (with all children) which have an Outcome
child element containing the text "Success". You'll probably want to have
something else but use this as a start for refinement.Obviously, it's not working or I wouldn't be asking for help. Sorry if I've not searched the FAQ properly.
J.Pietschmann 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








