[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
RE: [xml-dev] What does "optional" mean?
- From: David Lee <dlee@calldei.com>
- To: "Costello, Roger L." <costello@mitre.org>, "xml-dev@lists.xml.org"<xml-dev@lists.xml.org>
- Date: Sun, 26 Feb 2012 16:31:20 +0000
> Why make one element mandatory
> and another optional?
I suggest that the answer(s) to your new question is a lot more philosophical. I suspect all the previous answers you gave could be correct, but suggest the real answer is ill-defined or perhaps only definable with more context.
I'd step back and forget XML for a moment and consider the 'real world' which is often (usually?) what XML is used to model.
In a model of the real world why would you make some aspect of that model optional?
I suggest the answer to that would be the same as the XML question. That is, it has nothing at all to do with XML. The same question could be asked of any data format or model.
Why would you let a relational db column be null ?
Why would you allow a list to be variable length ?
Why would you allow a middle name to be blank ?
Why would you allow the existence of a 2nd battery be optional ?
....
The answers are as many as the questions
Perhaps some wisdom could be had by reading the short story "In the beginning was the command line"
http://www.cryptonomicon.com/beginning.html
I won't ruin the story but it ultimately addresses the same question.
Why have options and what is the result if you don't.
----------------------------------------
David A. Lee
dlee@calldei.com
http://www.xmlsh.org
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]