Posted: Mon Jun 23, 2003 7:22 am Post subject: Mrm Attributes
Newbie
Joined: 23 Jun 2003 Posts: 4
Hi can anyone please help me. How can i use attributes with Mrm's eg with XML you can do the following :
Set OutputRoot.Header.(XML.Attribute)Response = 'No';
This will display ... <Response="No"> in the output.
Can i use a statement similar to this in Mrm format.
Unfortunately it is not possible to use the field type (XML.Atttribute) in the MRM message body folder. This type is only understood by the XML parser and is needed in the absence of data model to follow. Ie the tree needs to store that this field needs to be rendered as an attribute because there is no other definitions in the generic XML domain.
However, when using MRM-XML then the XML physical format attributes settings are used to indicate how XML objects are to be rendered/written. Therefore when using MRM-XML you would create MRM objects in your MRM model that correspond to the structure of the XML message (usually done via DTD and the Schema importers as a preference). On the XML physical format layer there is an XML render field that indicates how a particular field is to be rendered. This can be set to such things as XML Element and XML Attribute etc. So when using MRM-XML, the message definitions contain this information therefore the message tree does not have to.
Care should be taken when using MRM-XML because XML is self-defining in nature. Therefore when not using MRM validation it is possible that elements can appear in the message and message tree that are not in the model. I mention this because if your message tree does not match the message definitions then a self defining element will be created that does not use the model definitions because it does match. The favourite for this seems to creating a compound type of sequence and then creating the elements in a different order in the message tree. This usually leads to the first field being rendered correctly because the rest match, but then the rest be rendered using defaults.
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