Subject: Re: [xsl] Attempting *not* to copy certain nodes From: 3rett 3onfield <brett@xxxxxxxxxxxxxxxxxxxx> Date: Wed, 14 Jan 2004 16:17:29 -0500 |
Date: Wed, 14 Jan 2004 13:12:47 -0500 From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Subject: Re: [xsl] Attempting *not* to copy certain nodes
At 2004-01-14 12:26 -0500, 3rett 3onfield wrote:
The code that suppresses the soap namespace is from G. Ken Holman's post: http://www.biglist.com/lists/xsl-list/archives/200207/msg01649.html
Unfortunately, this seems to generate errors in Saxon (Treebeard's processor), IE, and Firebird. Ken uses semicolons when declaring namespaces,
BigList must have added the semicolons, Brett ... reviewing my archives I see no semicolons in the original message. You'll note from the posted transcript that Saxon runs with the file that is exposed, and it would not have run if there were semicolons as that isn't well-formed.
other places they don't ( http://www.xml.com/pub/a/2001/04/04/trxml/ ), but both (or, of course, something else I'm doing wrong) generate errors such that I get no output.
You don't mention what errors you get ... I'm assuming you cleaned up the well-formedness of the file.
........................ Ken
<?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/" exclude-result-prefixes="soap-env" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="1.0"> <xsl:output method="text" indent="yes" encoding="UTF-8"/>
<xsl:template match="/"> <xsl:apply-templates select="soap:Envelope/soap: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="/"> <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"/> <xsl:text> </xsl:text> </xsl:if> </xsl:for-each> </xsl:template> </xsl:stylesheet>
IE 6: Reference to undeclared namespace prefix: 'soap'.
Firebird 0.7: Error loading stylesheet: Parsing an XPath expression failed.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Useful open-source XML/XSLT edi, M. David Peterson | Thread | Re: [xsl] Attempting *not* to copy , G. Ken Holman |
Re: [xsl] FO page width size accord, G. Ken Holman | Date | Re: [xsl] Attempting *not* to copy , G. Ken Holman |
Month |