Posted: Thu May 27, 2004 8:59 am Post subject: CWF MRM Nulls
Newbie
Joined: 16 Jul 2002 Posts: 4 Location: UK
I have defined an MRM (using WBIMB v5) to transform a fixed format input to XML output.
This works fine, however I would like to use the MRM to remove NULL fields from the message and not render them as XML. I cant see how to do this in the MRM (without resorting to ESQL in a tidy-up compute node).
e.g. If a CWF character field is completety padded with spaces I do not want an XML tag generated when I change from MRM to XML domain.
Is there a way of setting the MRM up to achieve this?
Using the Null Handling options in your CWF physical format, you could instruct the CWF parser to create nodes with NULL values for these fields.
However, I think you will still require some ESQL to remove the NULL fields from the tree - MRM null handling is designed for nodes which exist, but have an explicit value of NULL. If the node exists, the MRM XML writer will always output it.
Joined: 17 Oct 2003 Posts: 344 Location: IBM Hursley
Instead of not outputing a null field, you could consider using XML Schema Instance's mechanism for flagging a field as null - the xsi:nil attribute. This is supported by the V5 broker.
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