on 12-22-2004 11:37 PM
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 "http://xml.cXML.org/schemas/cXML/1.2.011/cXML.dtd"> does not come into the payload..
So I used prolog to add in the HTTP adapter but now its comingout as
<!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2.011/cXML.dtd">
<?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.
Thanks,
Ken
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('<!DOCTYPE Numbers SYSTEM ', $quote, 'http://xml.cXML.org/schemas/cXML/1.2.011/cXML.dtd', $quote,
'>')"/>
except I'm not sure this would be a valid result
Message was edited by: Achmed Aboulcher
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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="http://www.w3.org/1999/XSL/Transform">
<!-- Add the Doctype declaration -->
<xsl:output method="xml" indent="no" doctype-system="http://xml.cxml.org/schemas/cXML/1.2.011/cXML.dtd"/>
<!-- Identity Transform - copy the source XML to the output without any changes -->
<xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="node() | @*"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
But it looks like the SAP XSLT Processor has a bug since it creates the DOCTYPE incorrectly:
<!DOCTYPE cXML SYSTEM 'http://xml.cxml.org/schemas/cXML/1.2.011/cXML.dtd' [
]>
Instead of correctly as with the 4 other XSLT processors I tried it with:
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.011/cXML.dtd">
Therefore I'll need to take the other approach and write a Java map to do it.
Thanks,
Jesse
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.