|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: [OT] Re: Lessons learned from the XML experiment
On Fri, Nov 15, 2013 at 5:16 PM, Simon St.Laurent <simonstl@simonstl.com> wrote: > On 11/15/13 12:11 PM, David Sheets wrote: >> >> Can I be caught by the absence of an element not mapping correctly to >> a null value of a optional element? Is there some reason which I'm >> missing to encode the null value in a text node as a special value? > > > XML doesn't know from null. That's not its problem. I agree. This doesn't seem to be an XML problem at all. >> Is there something fundamentally wrong with the design of XML that >> prevents this kind of data modeling? Is there a trade-off? > > > If the absence of null strikes you as "fundamentally wrong", you're in the > wrong place. I'm not sure what you're trying to imply here. I'm genuinely wondering if there is some issue with treating the absence of an *element* as null for that element. > Also note - null isn't an especially XML conversation: > > <https://www.google.com/#q=%22null+considered+harmful%22> Many type systems include the parametric type "option" which is sufficient to model this data. In this case, the data model designer should have selected an optional string with the zero constructor mapped to nothing or a distinct element or an element with a special attribute and the "some" or "just" constructor mapped to an element with a text node. David > Thanks, > > -- > Simon St.Laurent > http://simonstl.com/ > > _______________________________________________________________________ > > XML-DEV is a publicly archived, unmoderated list hosted by OASIS > to support XML implementation and development. To minimize > spam in the archives, you must subscribe before posting. > > [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/ > Or unsubscribe: xml-dev-unsubscribe@lists.xml.org > subscribe: xml-dev-subscribe@lists.xml.org > List archive: http://lists.xml.org/archives/xml-dev/ > List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
[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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart


![Re: [OT] Re: Lessons learned from the XML experiment](/images/get_stylus.gif)





