cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid tag generated in result XML file, xslt mapping done using MAPFORCE

Former Member
0 Kudos

HI

My requirement is File to File using xslt mapping

I have done a very simple XSLT mapping, but through MAPFORCE tool

Here are the steps, I followed:

1. Supplied source xsd and xml file to MAPFORCE

2. Supplied target xsd file

3. mapped it as required

4. tested by supplying a sample xml file by clicking OUTPUT button, which displays perfect XML structure

5. Clicked XSLT button and copied and created a new file with extension .xsl file

6. Zipped the above xsl file

7. imported into IR imported archives folder

8. Selected the above xslt mapping in my Interface mapping.

9. Now tested my Interface Mapping by supplying sample some data for the source structure.

Now I got the error or warning "XML not well-formed" and got the successfull completion message window for my mapping when I proceed.

Now when I clicked xml source button for the target structure, It displays the invalid tag and starting with "#default"

So If I removed this particular tag at the first and last lines, it becomes a valid xml structure and able to see properly in my internet explorer

Here is the result I am getting:

<?xml version="1.0" encoding="UTF-8"?>

<#default:MT_Student_Result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:xsltMappingScenarios C:/DOCUME~1/Satya/Desktop/MT_Student_Result.xsd">

<Data>

<Name>Khan Raj</Name>

<Marks>

<Total_Marks>166</Total_Marks>

</Marks>

</Data>

</#default:MT_Student_Result>

When I tested through MAPFORCE it generates absolutely valid XML structure when I clicked OUTPUT button on MAPFORCE, but not when I used the xslt mapping through my interface mapping.

What is the error I am making or any step missing?

Please help me!

Edited by: Shilpa Shetty on Oct 9, 2008 4:17 AM

Edited by: Shilpa Shetty on Oct 9, 2008 5:58 AM

Edited by: Chris Rock on Oct 9, 2008 6:06 AM

Accepted Solutions (1)

Accepted Solutions (1)

former_member192295
Active Contributor
0 Kudos

Hi,

It is due to namespace value, check it once again, it will sort out easily

Former Member
0 Kudos

For some reason when I use MapForce tool to generate my xslt mapping source, it is generating the following statement in the xsl file.

<xsl:namespace-alias stylesheet-prefix="n" result-prefix="#default"/>

So at the root element of XML file, it is replacing the character n with '#default' for some reason, I don;t know the purpose of this.

As you suggested, I changed the name space, still I experienced same problem.

It is now resolved after removing the above xsl statement from the xsl file before creating/uploading the relevant zip file into archives folder.

It works fine now. Thanks for the clue.

Answers (0)