Hi,
I need to copy all the child elements from the parent element to output xml
using xalan c++ transform method. However, one of the child element is
prefixed but does not have corresponding namespace.
What should I do in xslt so that all the children elements of parent element
are copied to output xml file without caring the namespace. Altova XMLSpy does
that but When I use xalan c++ 1.10 , it does not copy.
How I can achieve this using xalan c++ 1.10 ?
E.g.
Input XML file
============
<?xml version="1.0" encoding="UTF-8"?>
<SwInt:Request >
<SwInt:RequestHeader>
<SwInt1:Requestor>cn=requestor,o=pimxbebb,o=swift1</SwInt1:Requestor>
<SwInt:Responder>cn=responder,o=pimxus33,o=swift</SwInt:Responder>
<SwInt:RequestRef>xyz</SwInt:RequestRef>
</SwInt:RequestHeader>
</SwInt:Request>
XSLT file
======
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:Sw="urn:swift:snl:ns.Sw" xmlns:SwInt="urn:swift:snl:ns.SwInt"
xmlns:SwSec="urn:swift:snl:ns.SwSec" >
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<xsl:copy-of select="/SwInt:Request/SwInt:RequestHeader"/>
</xsl:template>
</xsl:stylesheet>
Output Xml comes with
<?xml version="1.0" encoding="UTF-8"?>
Regards
Ajay