Wednesday, May 20, 2009

xsi:nil="true"

I can't find an authorative source on the use of xsi:nil vs. nullFlavor in HL7v3.

The ITS 1.0 only mentions that xsi:nil is allowed.

From what I've browsed on various lists, wiki, Google etc. I've come to the following picture: if some_element is declared with nillable="true" in it's schema, the following is allowed:



and is equivalent to:



and to:



is that correct?

And if minOccurs="0", are the three above equivalent to absence of some_element in the instance?

Finally, is also allowed?

Regards,

Marc
Grahame Grieve:

| Agree with Charlie except there is no need to use xsi:nil on the
| datatypes And it should not be done

I agree it would have been better if the form had never been allowed; but if a spec is out, and not very clear on the issue, there's no way to retrospectively disallow it. I guess all we can do in NL is to discourage it, maybe phase it out; but there's no way it can be suddenly illegal.

Cheers,

Marc
From the HL7 ITS lists 20th May 2009.