OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] How can I constrain publicly available schemas?

[ Lists Home | Date Index | Thread Index ]

On Mon, 2005-04-04 at 11:53 +1200, Fraser Crichton wrote:
> Thanks for getting back so quickly. Maybe I should clarify - 
> 
> The people submitting documents to my system are free to create
> documents as they wish so long as they validate against xCIL, so they
> can create a document with OrganisationInfo elements but my system can
> only deal with documents with PersonInfo elements. As far as my system
> is concerned the xCIL schema hasn't constrained the document
> sufficiently. 
> 
> So do I use business logic code to validate against this situation or
> do I create a more constrained schema in the same namespace (a scary
> thought)?

Why is that scary?

In a current client project, involving a large diversity of documents
form a diversity of sources, we use this basic pattern.  We have a
master schema (like xCIL in your case) and a derived schema (like your
more constrained version).  The key is that we have a formal means of
annotating the relationship between the master and the derived.  In this
way we can design our processing pipeline to deal with whatever
constraints are appropriate at any stage.  As long as people follow the
business rule that the universe of valid documents for any derived
schema is a subset of the universe of valid documents for the
corresponding master schema, it all works very well indeed.  The problem
is that code review is the only way we have to enforce this rule.  There
have been discussions of schema algebra on this list that might allow
for automated proofs, but I've never been able to boil the theories down
to running code, even though we use RELAX NG language in our project
(RELAX NG has the advantage of very clean semantics).

 
-- 
Uche Ogbuji                                    Fourthought, Inc.
http://uche.ogbuji.net    http://4Suite.org    http://fourthought.com
Use CSS to display XML, part 2 - http://www-128.ibm.com/developerworks/edu/x-dw-x-xmlcss2-i.html
Writing and Reading XML with XIST - http://www.xml.com/pub/a/2005/03/16/py-xml.html
Use XSLT to prepare XML for import into OpenOffice Calc - http://www.ibm.com/developerworks/xml/library/x-oocalc/
Be humble, not imperial (in design) - http://www.adtmag.com/article.asp?id=10286
State of the art in XML modeling - http://www.ibm.com/developerworks/xml/library/x-think30.html





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS