Showing results for 
Search instead for 
Did you mean: 

Prolog Useage

Former Member
0 Kudos

Hello guys,

I am sending an IDOC to a 3rd party using HTTP adapter. I need to bring in the Doctype into the payload of the message to the 3rd party. But for some reason the DOCTYPE <!DOCTYPE cXML SYSTEM ""> does not come into the payload..

So I used prolog to add in the HTTP adapter but now its comingout as


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

which is a FATAL error because the XML tag needs to be the first one.

Any ideas in bringing the DOCTYPE below the XML... or anyother better method of incorporating the DOCTYPE into the message coming out of the Integration server.

I used XSD format to pull in the target message into message mapping.



Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Ken,

Are you using ARIBA ? There are numerous problems with the cXML dtd's/xsd's ... they are not accepted by XI for some reason.

You could use the following code in XSL to produce it ...

<xsl:variable name="quote">"</xsl:variable>

<xsl:value-of disable-output-escaping="yes"

select="concat('&lt;!DOCTYPE Numbers SYSTEM ', $quote, '', $quote,


except I'm not sure this would be a valid result

Message was edited by: Achmed Aboulcher

Former Member
0 Kudos

Hello Achmed,

i am facing same problem for our scenario. I tried to use this method.

using this method.

it gives error as "Document is not valid xsd since it contains the <value-of> tag ".

Is there any other method to solve this problem.


Gaurav Jain.

Former Member
0 Kudos

My first approach was to use an XSL map after the original map to add the doctype in. I used the following:

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

<xsl:stylesheet version="1.0" xmlns:xsl="">

<!-- Add the Doctype declaration -->

<xsl:output method="xml" indent="no" doctype-system=""/>

<!-- Identity Transform - copy the source XML to the output without any changes -->

<xsl:template match="node() | @*">


<xsl:apply-templates select="node() | @*"/>




But it looks like the SAP XSLT Processor has a bug since it creates the DOCTYPE incorrectly:



Instead of correctly as with the 4 other XSLT processors I tried it with:


Therefore I'll need to take the other approach and write a Java map to do it.