[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Why does XML Schema allow elements with complex type tobe

  • From: Rick Jelliffe <rjelliffe@allette.com.au>
  • To: xml-dev <xml-dev@lists.xml.org>
  • Date: Mon, 15 Jul 2019 10:10:56 +1000

Re:  Why does XML Schema allow elements with complex type tobe
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@g...> 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]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.