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] What does "optional" mean?

Roger,

Thanks for the highly complimentary acknowledgement.

I'd like to offer yet one more perspective, perhaps somewhat broader 
than the concept of "optional".

It is very often (although perhaps not always) appropriate to think 
of a schema (using the term generically) as a contract between 
producers and consumers.  By agreeing to use a given schema for some 
purpose or situation, producers and consumers state that they 
mutually agree on the structure of the data that they exchange for 
that purpose or in that situation.  Consumers have confidence that, 
subject to confirming that the data does indeed conform to the 
structure (e.g., validation), the producer of the data has made 
good-faith efforts to supply data that the consumer knows how to 
consume.  Producers, in turn, have confidence that the data they 
produce will be of appropriate use to the consumer(s) of the data 
without a great deal of expensive and error-prone additional 
negotiation (e.g., human intervention).

Most (certainly not all) schema languages define a structure to data, 
but assign/declare/define very little -- perhaps no -- semantics to 
that data.  Semantics that are commonly provided are key/keyref 
relationships, value/range limits, and the like.  (Almost all, 
perhaps literally all, modern schema technologies provide that level 
of semantic capability.)  Beyond that, except for schema systems that 
are explicitly designed to provide semantic information (e.g., OWL in 
the RDF universe), the semantics of the data describes by schemas are 
specified by a higher-level contract (sadly, one that is often 
implied instead of explicit).  That sort of contract is quite often 
specified only in human-readable languages (e.g., documentation, 
legal contracts, word of mouth, and such).

I remind myself frequently that any schema that I read (whether SQL, 
XML, RDF, COBOL, Fortran, etc.) leaves far more unspecified than 
specified, and that it is extremely unsafe for me to casually infer 
all of the unspecified bits.  That is, I accept at face value what is 
explicitly given, and I "guess" at the remainder only at my peril.

If it's not written in the contract, then it's not part of the 
contract -- which doesn't mean that it's wrong.  Ask any lawyer ;^)

Thanks again,
    Jim


At 2/26/2012 03:35 PM, Costello, Roger L. wrote:
>Thanks to all who participated in this discussion -- David C, Mukul, 
>David L, Len, Dan, Michael, Jim, John, and Ken.
>
>Fascinating discussion!
>
>For me the discussion has been a great reminder:
>
>      Schemas don't have any semantics.
>
>I think that is something that bears repeating often.
>
>I particularly like Jim Melton's definition of "optional":
>
>     Optional, in XML Schemas, in DTDs, and other
>     XML-related standards (at least within the W3C)
>     means nothing more than "may be provided or
>     omitted".
>
>and he goes on to say:
>
>     Any "semantics" associated with the  provision
>     or omission of something optional might  be
>     provided by an application or other environment.
>
>Awesome clarity!
>
>At this point I will do my best at characterizing what I think 
>Walter Perry would say:
>
>     The consumer of an XML instance document that
>     has an omitted element or attribute is free to give
>     whatever meaning he or she desires to that omission.
>
>[Walter, if I have not accurately characterized your ideas please correct me.]
>
>/Roger
>
>
>_______________________________________________________________________
>
>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

========================================================================
Jim Melton --- Editor of ISO/IEC 9075-* (SQL)     Phone: +1.801.942.0144
   Chair, ISO/IEC JTC1/SC32 and W3C XML Query WG    Fax : +1.801.942.3345
Oracle Corporation        Oracle Email: jim dot melton at oracle dot com
1930 Viscounti Drive      Alternate email: jim dot melton at acm dot org
Sandy, UT 84093-1063 USA  Personal email: SheltieJim at xmission dot com
========================================================================
=  Facts are facts.   But any opinions expressed are the opinions      =
=  only of myself and may or may not reflect the opinions of anybody   =
=  else with whom I may or may not have discussed the issues at hand.  =
========================================================================  



[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