XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Why does XML Schema allow elements with complex type tobe nillable?

The problem I have with nillibility is not the funtionality but that it seems to be declared at the wrong layer.  You have to put it into the schema, which means you have to write the schema with a view to what non-deltas can be elided, which moves away from information and into a particular application, contrary to the basis of XML/SGML of separating markup and processing.

I think a properly layered version would be that XSD processors can be given a stop list of elements (or contexts) that are allowed to be nilled.  So still put the xsi:nill attribute in lieu of the true content, but not make it a schema-creation-time decision when it should be an application decision.  You want to avoid making application-specific dialect of schemas, for maintenance and politics reasons.  In many cases, particularly with large organizations or public schemas, the people who might want to take advantage of nillibility have no input into the base schema.  Separation of concerns not kitchen sinks please!

Regards
Rick

On Fri, Jul 12, 2019 at 11:47 PM Lauren Wood <lauren@textuality.com> wrote:
Another potential use case would be in healthcare - there's a difference between saying the patient has no allergies, and the patient has no known allergies.

HL7 CDA and FHIR express this difference in other ways though. CDA and FHIR use a particular attribute with a fixed set of values to correspond to the various cases (unknown, not asked, not applicable, ...). https://www.hl7.org/fhir/v3/NullFlavor/cs.html has the details.

Lauren



On Fri, Jul 12, 2019 at 6:40 AM Tomos Hillman <yamahito@gmail.com> wrote:
On 12 Jul 2019, 11:24 +0100, Rick Jelliffe <rjelliffe@allette.com.au>, wrote:
I don't think you should use nillible for the case of someone who has no middle name. That is simple optionality.

nillible is for a more esoteric purpose: where whether that person has a middle name or not has not been disclosed. This may because you don't know, the client didn't ask, or you dont want to tell. 

I think there's also the use case where a middle name was present (erroneously?) and has been removed, perhaps leaving a modification time stamp attribute.

Pretty horrible way to do it, IMO, but there you go

Thanks,
Tom



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS