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

Re: How can I constrain publicly available schemas?


Re:  How can I constrain publicly available schemas?
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


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.