cancel
Showing results for 
Search instead for 
Did you mean: 

Add Doctype to the XML File

Former Member
0 Kudos

Experts,

My Scenario is JDBC to File

For the resultant xml file i have to include a <DOCTYPE> after

<?xml version="1.0" encoding="UTF-8" ?> while passing it to legacy system ?

I had written an XSLT Code to acheive this, i checked in XML spy and it is working.

but in moni iam getting an error in message mapping

my XSLT Code is

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- Add the Doctype declaration -->
<xsl:output method="xml" indent="no" doctype-system="http://integratex.quality.techdata.de:8080/ix/dtd/ixOrder.dtd"/>
<!-- Identity Transform - copy the source XML to the output without any changes -->
<xsl:template match="node() | @*">
            <ns0:MT_ASNDATAOUT xmlns:ns0="http://aaaaa/sd/SD152.25">
            <xsl:copy> 
                                                <xsl:apply-templates select="node() | @*"/>
            </xsl:copy>
            </ns0:MT_ASNDATAOUT>
</xsl:template>
</xsl:stylesheet>

and the error in moni is

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> 
- <!--  Request Message Mapping 
  --> 
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
  <SAP:Category>XIServer</SAP:Category> 
  <SAP:Code area="MAPPING">GENERIC</SAP:Code> 
  <SAP:P1>Parsing error after multi mapping.</SAP:P1> 
  <SAP:P2>Expected Message<i> instead of Messages</SAP:P2> 
  <SAP:P3 /> 
  <SAP:P4 /> 
  <SAP:AdditionalText /> 
  <SAP:ApplicationFaultMessage namespace="" /> 
  <SAP:Stack>Parsing error after multi mapping.Expected Message<i> instead of Messages</SAP:Stack> 
  <SAP:Retry>M</SAP:Retry> 
  </SAP:Error>

Iam doing multi mapping between source and target, is m ulti mapping causing the issue?

and also check my xslt code,it is working in xml spy as desired.

Please help me on this

Appreciate your help.

Thanks

Srinivas

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Solved myself, written a unix command in the post processing steps in the receiver file adpater

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi Srinivas,

You need to accomadate the Doctype Value in Receiver Side ,Try to create extra element in receiver data type and store the DOCTYPE in that element.

Regards,

Raj

Former Member
0 Kudos

Hi Rajsekhar,

Thanks for your Help.

My Target is a dtd

do you want me to modify the dtd to include the element DOCTYPE?

Srinivas

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

Yes you have to chnage the DTD structure to add DOCTYPE Value,one morething when you executing XSLT mapping Multi Mapping scenario it shouls also supports multi mapping feature.Fisrt execute XSLT Mapping program without multi mapping,let me know how its behaving.

Regards,

Raj