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?

Hi Folks,

 

Here are three XML representations for the name John Doe:

 

<Name>
   
<First>John</First>
   
<Middle xsi:nil="true"></Middle>
   
<Last>Doe</Last>
</Name>

<Name>
   
<First>John</First>
   
<Middle></Middle>
   
<Last>Doe</Last>
</Name>

<Name>
   
<First>John</First>
   
<Last>Doe</Last>
</Name>

 

Description #1

Rick says that the first XML representation – with xsi:nil="true" – does not disclose whether John Doe has a middle name or not. The reason for not disclosing may be because the author of the XML doesn't know John Doe’s middle name, or the requestor of the XML didn't ask for John Doe’s middle name, or the author of the XML doesn’t want to tell.

 

Description #2

Rick says that the last XML representation – no <Middle> element – indicates that John Doe has no middle name.

 

Description #3

What does the second XML representation – empty <Middle> element – denote?

 

Notice that the descriptions state the meaning of the XML:

 

  • The first XML representation means John Doe’s middle name is not being disclosed.
  • The last XML representation means John Doe does not have a middle name.
  • Uncertain about the meaning of the second XML representation.

 

In Rick’s most recent post, he states:

 

  1. XML does not have meaning. The three XML representations do not mean, denote, or indicate anything.
  2. Core to XML is the separation of syntax (markup) and meaning (how to interpret and process the syntax)

 

Rick advises against using xsi:nil

 

Rick, have I accurately captured your thoughts?

 

/Roger



[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