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] [OT] Re: [xml-dev] 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]


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