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?

 >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 
approval.

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 
message.

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
Saxonica


[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