Subject: Re: [xsl] unnecessary soap elements From: David Carlisle <davidc@xxxxxxxxx> Date: Fri, 28 Oct 2005 14:37:09 +0100 |
<!-- - Any tag not addressed by a more specific - template match is copied unchanged. (This - preserves the ph_dispatchmsg tags.) --> <!-- Here we dump out the rest of the message tags--> <xsl:template match="node()|@*"> Note that the comments are misleading: XSLT has no access to the tags in the source file (don't use tag to mean element, they mean different things) However that does copy all elements, as you say. You also have <xsl:template match="/"> <xsl:apply-templates/> </xsl:template> (which isn't strictly needed as it's the same as the default, but that starts processing at the top level element, which is therefore copied. If you want to start processing somewhere else, do for example <xsl:template match="/"> <xsl:apply-templates select="soap:Envelope/soap:Body/*"/> </xsl:template> <xsl:template match="Body/urn:SubmitRequestResponse"> That would match an element SubmitRequestResponse in namespace urn:Fiserv.CWS that was a child of an element Body in no-namespace. There is no such element in your source, as the only Body element is in teh soap namespace. i think you just want <xsl:template match="urn:SubmitRequestResponse"> Note you are using a very verbose style which makes it hard to see what your code is doing, for example <xsl:element name="status"> <xsl:attribute name="code"><xsl:value-of select="$code"/></xsl:attribute> </xsl:element> could be written <status code="{$code}"/> and in fact you don't really need the code parameter either you could just do <status code="{urn:SubmitRequestResult/fi:fiAPI/fi:Response/fi:Status/fi:StatusCode}"/> David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] unnecessary soap elements, jaya vardhani | Thread | Re: [xsl] unnecessary soap elements, jaya vardhani |
Re: [xsl] unnecessary soap elements, jaya vardhani | Date | Re: [xsl] unnecessary soap elements, jaya vardhani |
Month |