on 07-24-2007 5:30 PM
All,
Im having this following XSLT do the mapping..
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="/">
<ns0:Target xmlns:ns0="urn:Target">
<sessionid><xsl:value-of select="MT_SOURCEMESSAGE/dataId"/></sessionid>
<TargetMsg>
<xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[]]></xsl:text>
<xsl:copy-of select="MT_SOURCEMESSAGE/Source"/>
<xsl:text disable-output-escaping="yes"><![CDATA[]]]]></xsl:text>
<xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>
</TargetMsg>
</ns0:Target>
</xsl:template>
</xsl:stylesheet>
the issue is when we get the source message in the following format,
<ns0:MT_SOURCEMESSAGE xmlns:ns0="http://mycomp/test">
<sessionId>1223221</sessionId>
<Source>
<Employee>
<Id>252103175</Id>
<Name>Sam</Name>
</Employee>
</Source>
</ns0:MT_SOURCEMESSAGE>
the mapping fails...
IF I REMOVE the "ns0:" in the source message, it works. What command in the XSL should i use to overcome this?
Thanks
Hi,
You can get rid of the namespace also. Check this weblog:
/people/sameer.shadab/blog/2005/12/05/how-to-remove-namespaces-in-mapping--xi
or
Check question 12 in Integration engine section of michals weblog:
/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Replace <xsl:copy-of select="MT_SOURCEMESSAGE/Source"/> with <xsl:copy-of select="//MT_SOURCEMESSAGE/Source"/>
it shud work...as it specifies a relative path
praveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try this...it worked on my machine
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
<xsl:template match="/">
<ns0:Target xmlns:ns0="urn:Target">
<sessionid><xsl:value-of select="//sessionId"/></sessionid>
<TargetMsg>
<xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[
]]
>
]]>
praveen
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.