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?

Summaries #1 and #2 are fine. 

#3 we did not deal with, so it looks like the case where the schema requires an element for middle even if it is empty. Happens often.

However the last summary mentioning semantics I dont recognise from what I wrote. Wasn't my last post about layering? I think you have flipped from "what is a good way to mark things up?" (where semantics are all the buzz) to "what can reliable be inferred from some markup" (where semantics are prone to being guessed wrong) which I didnt think is our topic, is it?

On Mon, 15 Jul. 2019, 21:59 Costello, Roger L., <costello@mitre.org> wrote:

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