Suppose I am having this input xml:<Event><Test></Test><Result
Value="true"><Request xmlns='http://tempuri.org/AtoB.xsd' RequestID=""
MessageID="" UniqueID="000172581"/><Application></Application></
Result></Event>
and I want this xml output:<Event><Test></Test><Request xmlns='http://
tempuri.org/AtoB.xsd' RequestID="" MessageID="" UniqueID="000172581"/
><Application></Application></Event>
i.e removing of <Result> tag in the output xml string & For this I
wrote an xslt but I am getting one problem.
Problem: the xmlns attribute in the Request tag is precluding XSLT to
parse input xml ahead of <Request> tag, i.e I am
getting :<Event><Test></Test></Event>
Question: Could anybody tell me what can i do in my XSLT sothat xmlns
will not prevent generation of output xml ahead of <Request> tag &
will get proper output as I mentioned above?
Thanks,
Amit
Martin Honnen - 20 May 2008 14:55 GMT
> Suppose I am having this input xml:<Event><Test></Test><Result
> Value="true"><Request xmlns='http://tempuri.org/AtoB.xsd' RequestID=""
[quoted text clipped - 5 lines]
>> <Application></Application></Event>
> i.e removing of <Result> tag in the output xml string
Here is an XSLT stylesheet
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="Result">
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>

Signature
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/