cancel
Showing results for 
Search instead for 
Did you mean: 

Error in XSLT mapping : SAXParseException: Element type "Attrib" must be followed by either attribute specifications, ">" or "/>"

former_member184948
Active Participant
0 Kudos

Dear Experts,

I have made an interface which coverts a xml file into XLS /excel file.

I enhanced a xslt mapping which was working fine and deployed that in PI server.In PI server under imported archives I uploaded the zip file .

But when I run interface it fails.

To ascertain if mapping is correct, I put the content in test tab and tested , there it works fine.

I tested the interface with less content then it produces a file with garbage xml data. By looking at error it looks that problem is with tag >but not sure if this problem is wiht incoming file data or with xslt mapping?

Error:

Mapping "urn:oce:pi:eu1:CCSOC_B2B:DSP004_PriceCatalog_NSO_2_PriceCatalog/DSP004_PriceCatalog_NSO_2_ProdCat4XLSX" failed to execute: MappingException: Mapping failed in runtime204, ApplicationRuntimeException: Runtime Exception when executing application mapping program com/sap/xi/tf/_DSP004_PriceCatalog_NSO_2_ProdCat4XLSX_; Details: com.sap.aii.utilxi.misc.api.BaseRuntimeException; Element type "Attrib" must be followed by either attribute specifications, ">" or "/>"., BaseRuntimeException: Element type "Attrib" must be followed by either attribute specifications, ">" or "/>"., BaseRuntimeException: Element type "Attrib" must be followed by either attribute specifications, ">" or "/>"., org.xml.sax.SAXParseException: Element type "Attrib" must be followed by either attribute specifications, ">" or "/>".

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member184948
Active Participant
0 Kudos

Thanks Guys for your response ,

but I noticed one thing today, that when I test the xml of the source xml file in TEST tab of OperationMapping in ESR it works fine and then I copied xml output of the OM and just created a file with extention .xls and it works fine.I could see excel file with contents properly in excel format.

That would mean problem is not with xslt mapping and neither with source xml, but not sure why then it gives error in receiver file adapter!!

Any thoughts?

former_member186851
Active Contributor
0 Kudos

Hello Dilip,

Did you test with the run time payload?

former_member184948
Active Participant
0 Kudos

Oh man,

Thanks for making this point.What I had done was, opened the source xml file and copied the content in test tab and it worked that way, but now when I went to message and saw the payload , I realized  that the payload does not contain whole xml content but only 30% and it does not end with > , may be this is the reason it is failing wiht such error.

I was trying sxda_tools transaction to place file at PI backend  but looks it  is placing only part of it , so other transaction that I know is CG3Z and CG3Y but PI does not recognize these transactions .

You know any transaction using which I can place the whole file at PI backend ?File is 136kb xml file.

former_member186851
Active Contributor
0 Kudos


Download and it open using Notepad+.

former_member184948
Active Participant
0 Kudos

Thanks Raghuraman,

Your answer was right, the problem was in the data.

When you asked me to check runtime payload , I realized that the file which we were trying to put was never getting placed completely, hence PI throwing error related to tags.

I want to mark your answer as correct but its not giving me any option , I dont know why.Appearing to me like somebody else opened this question, even though I did.

former_member186851
Active Contributor
0 Kudos

Not sure..Some moderators should help here.

manoj_khavatkopp
Active Contributor
0 Kudos

You wont be able to mark helpful/correct as you have not opened this discussion as a question

former_member187587
Contributor
0 Kudos

Your test data is not valid.

former_member186851
Active Contributor
0 Kudos

Hello Dilip,

This seems to be problem with DATA.

Ensure all tags are closed and also get the data in the run time and test the same in Operation mapping.

former_member184948
Active Participant
0 Kudos

Thanks Raghuraman,

I will ask source team to check the xml file they sent , but one thing i observed is  that when I copied the source content and check in test tab , it gives me proper form in tree structure, not red nowhere , doesn't that mean the structure is fine?

former_member186851
Active Contributor
0 Kudos

Yes.Input XML is not correct Dilip.

And also when you test your XSLT with other data its working which confirms the XSLT is fine.