on 11-06-2008 11:34 AM
Hi Friends,
I had a problem while loading XSLT mapping in IR.
After mapping in Altova file was saved as .xsl format.
But while testing in interface Mapping i'm getting message "XML not well formed", I'm pasting code over here plz do help me in solving this issue:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:n="http://sap.com/blr/xi/xslt"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs xsi xsl"
xmlns="http://sap.com/blr/xi/xslt">
<xsl:namespace-alias stylesheet-prefix="n"
result-prefix="#default"/>
<xsl:output method="xml" encoding="UTF-8"
indent="yes"/>
<xsl:template match="/n:XSLTSRC_MT">
<n:XSLTTAR_MT>
<xsl:attribute
name="xsi:schemaLocation">
<xsl:value-of
select="'http://sap.com/blr/xi/xslt
C:/DOCUME~1/skg/Desktop/XSLTTAR_MT.xsd'"/>
</xsl:attribute>
<xsl:for-each select="CONSID">
<xsl:variable
name="Vvar29_CONSID_string" select="string(.)"/>
<EMPID xmlns="">
<xsl:value-of
select="$Vvar29_CONSID_string"/>
</EMPID>
</xsl:for-each>
<xsl:for-each select="CONSNAME">
<xsl:variable
name="Vvar33_CONSNAME_string" select="string(.)"/>
<EMPNAM xmlns="">
<xsl:value-of
select="$Vvar33_CONSNAME_string"/>
</EMPNAM>
</xsl:for-each>
<xsl:for-each select="CONSORG">
<xsl:variable
name="Vvar37_CONSORG_string" select="string(.)"/>
<EMPROLE xmlns="">
<xsl:value-of
select="$Vvar37_CONSORG_string"/>
</EMPROLE>
</xsl:for-each>
<xsl:for-each select="CONSROLE">
<xsl:variable
name="Vvar41_CONSROLE_string" select="string(.)"/>
<EMPORG xmlns="">
<xsl:value-of
select="$Vvar41_CONSROLE_string"/>
</EMPORG>
</xsl:for-each>
<xsl:for-each select="CONSDOB">
<xsl:variable
name="Vvar45_CONSDOB_string" select="string(.)"/>
<EMPDOB xmlns="">
<xsl:value-of
select="$Vvar45_CONSDOB_string"/>
</EMPDOB>
</xsl:for-each>
</n:XSLTTAR_MT>
</xsl:template>
</xsl:stylesheet>
Regards,
VKG.
Hi,
1) "XML Not Well Formed" this will occur when either your Source or Target Message is not according to the one you have specified in your mapping....there might be some more or less number of fields in your mapping than the actual fields or declaration of the same may not be proper.....
2) please go to the Test tab (IR---MM/IM) there try to view both the messages in the text format (there is an option to view source) and compare it with the format that you have used in the mapping....
3) also check if the prefix n: that you have used is the same....you can change it according to what you can see in the source.....for me it always comes as a:/b:...but i dont think it should cause any problem...just for your knowledge....
Regards,
Abhishek.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI
Issue is not with getting XSL from Altova XML spy your logic is not able to generate correct target XML file. Check this or share the target you want to generate to solve furthur
Thanks
Gaurav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Make sure the input message root tag name and namespace are correct. Itu2019s possible that you are not matching the template you want to match. Making the following changes will help you debug it:
From this: <xsl:template match="/n:XSLTSRC_MT">
To this: <xsl:template match="/">
Depending on the namespace of CONSID and the other fieldsu2026
From this: <xsl:for-each select="CONSID">
To this: <xsl:for-each select="/n:XSLTSRC_MT/n:CONSID">
-Russ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
What you provieded XSL is Well formed,I checked in XML SPY,
I think its not prodcing welformed output,
check logic in XSL,and Input Data,Can you provied Input data so that i will check.
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try to use extension-element-prefixes instead of the exclude-result-prefixes.
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.