[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Attempting *not* to copy certain nodes

Subject: RE: [xsl] Attempting *not* to copy certain nodes
From: 3rett 3onfield <brett@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 14 Jan 2004 21:31:27 -0500

Thank you for the wonderful guidance. I haven't been this pleased with anything programming-related in a very long time.

I've gotten very, very close... I think. I changed the SOAP feed I'd been getting to...


?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="CopySuccessSoap.xslt"?>
<Message>No match found for this security identifier.</Message>
<CategoryOrIndustry />




...and changed my XSLT to read...


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
<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 match="*"> <!--synthesize element with the input name-->
  <xsl:element name="{name(.)}" namespace="{namespace-uri(.)}">
    <xsl:copy-of select="@*"/>

    <xsl:template match="/">
	<xsl:for-each select="MapSecuritiesResult/Security">
		<xsl:if test="Outcome='Success'">
		<xsl:copy-of select="Name"/>, <!--
		--><xsl:copy-of select="Symbol"/>, <!--
		--><xsl:copy-of select="CIK"/>, <!--
		--><xsl:copy-of select="Cusip"/>, <!--
		--><xsl:copy-of select="Market"/>


I get no errors in Treebeard (Xalan--thank you for making me look up the difference between Xerxes and Xalan) or Firebird or IE... and also no output. Is it an XPath issue? I've been trying to rule that out, but so far I'm still getting nothing: no errors and no output.

I really appreciate the help. So far I've been working so far through online tutorials, but I think some dead trees would do me good. Should I wait for new editions of the books listed in the FAQ (haven't seen anything in the FAQ or the archives about updates) or head over to the bookstore and buy what's on the shelves?


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list

Current Thread