ProcessDocument with Empty Tags in it

Hi All,

I am calling processDocument to send the internal Document to TN. when I am calling processDocument the document has lots of NULL values in it. but when I call the document back from TN all the NULLS are converted into “Blank Tags” or empty Tags which is causing mapping issues.

Any suggestions or idea???

I am working on RosettaNet Module.

If you consider a blank just as useless as a then you can either have a duplicate seq on a branch that will handle the blank in the same manner as the null$. I would have an additional variable like isEmpty that will be set in a first branch and the test for isEmpty later so I am only working with that and not both ‘’ and $null everywhere.

If the blank is a unique needed value, you can initially setup a magic value to replace the nulls. I was just speaking about this is a post Tuesday.

Hi Yemi,

Thanks for the email.

I have 90 fields in the PIP and I don’t think I can branch for every fields. also Schema is a complex structure not just header and line.


  • When you’re mapping documents, if a field’s not going to be used in the output document, then there’s no reason to map it. If you have input fields that might be null, use conditional mapping.
  • A clean mapping (with appropriate use of conditional mapping) makes the output document easier to debug. If an empty tag shows up, you know something’s wrong. If 91 fields are empty, but 1 shouldn’t be, boy, that’s hard to trace.
  • Lastly, you would get a lot of validation errors if you’re doing output validation with a strict schema (i.e. RosettaNet)

By conditional mapping, I don’t mean doing branch-N-map, but double-click on a mapping line and set “Copy only if…”. I think wM 6 classes teaches this, but wM 4.X classes didn’t. But anyway, I think this should actually resolve “RosettaNet Consultant’s” problem.

I think Yemi’s suggestion actually deals with a slightly different problem, one that tries to preserve nulls instead of preventing them. For RC’s problem, a very quick-n-dirty way of dealing with null (or blank) fields is to eliminate the tags as XML string. But I’ll leave it at that, as this is mending the fence after the sheeps have escaped… 8(