[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: What does "optional" mean?

  • From: Dan Brickley <danbri@danbri.org>
  • To: "Costello, Roger L." <costello@mitre.org>
  • Date: Sun, 26 Feb 2012 17:20:18 +0100

Re:  What does "optional" mean?
On 26 February 2012 15:11, Costello, Roger L. <costello@mitre.org> wrote:
> Hi Folks,
>
> Every schema language (DTD, XSD, RNG) has the notion of optional -- optional elements and optional attributes.
>
> But what does it mean to declare an element or attribute optional?
>
> Here are some possibilities:
>
> 1. The information that would be contained within the element or attribute is of secondary or lesser importance. This is in contrast to a mandatory element or attribute which contains information of primary importance. Thus, optionality is an indication of the importance (rather, the lack of importance) of the information contained within the element or attribute. This is analogous to the common practice in textbooks to place the core concepts first and the non-core concepts last. Under this interpretation, it would be perfectly reasonable for a consumer to ignore optional elements and attribute because they provide only non-core information.
>
> 2. Yesterday Jim Melton and Michael Kay beautifully described schemas as an abstraction [1][2]. That is, a schema is a determination of the information that is relevant when modeling the real world. But if a certain property is determined relevant (and thus included in the schema), then why would one turn around and make it optional? Isn't that tantamount to saying it's not relevant? Isn't that a contradiction?
>
> 3. A third possibility is that optional means "Hey, if you don't have the information then you can omit this element (or attribute)."
>
> I've listed three possible meanings of "optional":
>
>    -- In the first meaning, it indicates:  of-lesser-importance.
>
>    -- In the second meaning, it indicates:  irrelevance.
>
>    -- In the third meaning, it indicates:  lack-of-knowledge.
>
> So what does "optional" really mean?
>
> You may reply, "It means anything you want it to mean." If so, how can there be an effective exchange of information? Surely there must be more precision to the term than "It means anything."
>
> What do you think "optional" means?

RDF (ever the misfit :) is more in the third category, if anything.
But it's not a document format schema system, and the difference shows
here. With RDF schema (and its fancier sibling, OWL) we explicitly
avoided mechanisms that give schema authors any power over what must,
or mustn't, be in some particular instance document. RDF schema and
OWL let you define terminology, a dictionary of classes and
properties, that can be used to make claims about the world.  Its
constraints encode observations the modeled world, not about
acceptable descriptions of it (apart from avoiding contradictions
etc.). So everything is optional by design; nobody forces you to say
anything at all! This is both liberating and maddening; real world
apps usually prefer tighter constraints. So in practice people layer
those constraints on later (somewhat schematron-style) by using SPARQL
queries that capture their app-specific, workflow-specific
expectations of what ought to be in the data (e.g. see
http://spinrdf.org/ ). But when a construct like
OWL:FunctionalProperty is used on something like 'dateOfBirth' or
'age', it's saying "people have at most one date of birth; have at
most one age...", rather than anything at all about what some kinds
factual claim of documents should include. So a 'birthday card' app
layered on this might demand such info as a basic precondition of
being able to do any useful work, whereas a public Web profile
management app might (for privacy reasons) advise against exposing
just that same info. In this way, RDF's inbuilt lack of constraint
helps bind together otherwise different apps via common definitions.

cheers,

Dan


[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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.