I am trying to add a DTD reference to a message.
The code seems easy enough :
SET OutputRoot.XML.(XML.DocTypeDecl).(XML.SystemId) = '001_TEST.dtd';
This does indeed add a DTD reference, but it then removes the base elelment XML tag which is '001_TEST' (XML standard).
It only seems to work if the DTD reference is different to the base element. This, however, would cause a problem in the XML parser it meets when it gets to the system that receives this message.
Has anyone got this to work properly ?
Iam on v2.0.1 by the way.
Joined: 16 Sep 2001 Posts: 38 Location: Hampshire, UK
Not sure if this answers your question but this is something you may be falling foul of ...
When using messages where the XML and DTD declarations are present it is worth noting
that the DTD element and the root element of the message are created at the same level
of the syntax element tree.
As the DTD and root element are normally the same (the same element label or name), then
we have to distinguish between them when refering to them in a path.
For example :
Input Message
=============
<?xml version="1.0"?>
<!DOCTYPE Message PUBLIC "Message.dtd">
<Message>
<FirstName>John</FirstName>
<LastName>Smith</LastName>
</Message>
Compute Node ESQL
=================
/* this path refers to the DTD */
SET OutputRoot.XML.Message ...
/* this path refers to the actual message body called "Message" */
SET OutputRoot.XML.(XML.tag)Message ...
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum