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

Re: What does "optional" mean?

  • From: Michael Kay <mike@saxonica.com>
  • To: xml-dev@lists.xml.org
  • Date: Mon, 27 Feb 2012 00:38:06 +0000

Re:  What does "optional" mean?
 >BTW, as further illustration that data elements shouldn't be 
considered mandatory or optional independently of context

This notion of "context" makes schema design really difficult, because 
most schema languages (Schematron as usual being the exception) don't 
have any notion that validity can depend upon context. For example, 
certain metadata is mandatory in a document that you are sending out to 
customers, but optional if it's a draft being distributed internally for 

I've seen people getting into a real mess by deciding that fields were 
mandatory because the data model says there must be a value, but the 
fact that there is a value doesn't mean the value has to appear in every 

In Saxon I've been experimenting with allowing XSD assertions to be 
parameterized, with the parameter values being specified at the time 
schema validation is invoked. It works well, except that most schema 
validation APIs don't allow parameters to be supplied, so it requires 
new APIs. One solution to that might be to allow an XSD wrapper document 
to supply the parameters, so when you name a schema document to use for 
validation, it has the parameter values already bound.

Michael Kay

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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.
First Name
Last Name
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.