Subject: RE: [xsl] Attempting *not* to copy certain nodes From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Fri, 16 Jan 2004 07:38:15 -0500 |
Date: Thu, 15 Jan 2004 07:07:37 -0500 From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Subject: RE: [xsl] Attempting *not* to copy certain nodes At 2004-01-14 21:31 -0500, 3rett 3onfield wrote: ... Change the second to match the response element and see what happens.
t:\ftemp>type brett.xml <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="CopySuccessSoap.xslt"?> <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap-env:Body> <MapSecuritiesResponse xmlns="http://www.xignite.com/services/"> <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>
</MapSecuritiesResult> </MapSecuritiesResponse> </soap-env:Body> </soap-env:Envelope>
t:\ftemp>type brett.xsl <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:svcs="http://www.xignite.com/services/" exclude-result-prefixes="soap-env" version="1.0"> <xsl:output method="text" indent="yes" encoding="UTF-8"/>
<xsl:template match="/"> <xsl:apply-templates select="soap-env:Envelope/soap-env:Body/node()"/> </xsl:template>
<xsl:template match="*"> <!--synthesize element with the input name--> <xsl:element name="{name(.)}" namespace="{namespace-uri(.)}"> <xsl:copy-of select="@*"/> <xsl:apply-templates/> </xsl:element> </xsl:template>
<xsl:template match="svcs:MapSecuritiesResponse"> <xsl:for-each select="svcs:MapSecuritiesResult/svcs:Security"> <xsl:if test="svcs:Outcome='Success'"> <xsl:copy-of select="svcs:Name"/>, <!-- --><xsl:copy-of select="svcs:Symbol"/>, <!-- --><xsl:copy-of select="svcs:CIK"/>, <!-- --><xsl:copy-of select="svcs:Cusip"/>, <!-- --><xsl:copy-of select="svcs:Market"/> <xsl:text> </xsl:text> </xsl:if> </xsl:for-each> </xsl:template> </xsl:stylesheet>
-- North America (Washington, DC): 3-day XSLT/2-day XSL-FO 2004-03-15 Instructor-led on-site corporate, government & user group training for XSLT and XSL-FO world-wide: please contact us for the details
G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) ISBN 0-13-065196-6 Definitive XSLT and XPath ISBN 0-13-140374-5 Definitive XSL-FO ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath ISBN 1-894049-11-X Practical Formatting Using XSL-FO Member of the XML Guild of Practitioners: http://XMLGuild.info Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Attempting *not* to copy , 3rett 3onfield | Thread | RE: [xsl] UBB Code and XSLT, nearly, David . Pawson |
Re: [xsl] Aligning left, center and, David Tolpin | Date | Re: [xsl] Aligning left, center and, David Carlisle |
Month |