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

W3C schema, RelaxNG, and Schematron

  • To: xml-dev@l...
  • Subject: W3C schema, RelaxNG, and Schematron
  • From: Dan Vint <dvint@d...>
  • Date: Mon, 18 Apr 2005 10:16:57 -0700

relaxng schematron
My organization is currently 100% W3C schema based and I'm wondering if 
some of these other tools/approaches might be a fix for some of the 
problems we are running into.

Mainly we are having troubles with extensions/restrictions and the 
following requirements:

1) No mater what method is used to define an extension or restriction to an 
element, internal content choice group,  or code list, the resulting data 
stream should not be any different. So a technique that required an 
xsi:type value would not fit with this requirement, because we do not want 
any of the see what we call "schema artifacts" to be in the data stream. If 
every possible method for defining an extension required an xsi:Type value 
then it would be allowed. We want the minimum impact on the data stream as 
possible.

2) We want to tightly validate the original content as well as the extensions.
2a) We want to be able also validate the content from the core 
specification and ignore any extensions.

3) Where possible extensions can be based upon the core elements in our 
standard. So if someone is creating a new aggregate element and needs an 
EffectiveDate element and our standard has one, we encourage them to reuse 
our element rather than creating a new.

4) The extension methods should be supported at least by the core tools on 
Java and MS platforms. So we test with Xerces-J and MS-XML parsers.

5) We would like to have one standard method of handling extensions and 
restrictions; not one solution for restriction, another for extension and 
maybe another for handling code values.

We have not found a way to do all of the above, we can answer different 
parts but  not all the requirements. We essentially have two approaches 
currently and would like to find the ultimate solution that answered all of 
the above. I'm wondering  if RelaxNG or Schematron might help some of this 
without creating too much of a burden maintaining these other environments.

Solution 1

We are using redefine for both extension and restriction. We are defining 
our code lists in two steps to allow for extension and all our elements are 
globally defined.  Our codes are fist defined with a unique name with no 
enumerated values. We then use redefine to define the content of these 
lists in a separate redefining schema. We figure this at least allows some 
one to easily manage this file by adding or subtracting values from the 
list. Not a perfect solution but it seems to be the only workaround to 
allow this.

Solution 2

This other group is using a standard element called <Extensions> that has 
as content the xsd:any element. This allows for the validation of the core 
standard. We have also been able to use redefine on these elements to allow 
us to specify the actual content model (without the xsd:any) so we get 
tight validation. This works with Xerces but doesn't work with MS-XML. This 
also requires the use of redefine to get restriction, the xsd:any is for 
extensions. We have not implement this to allow extensions of internal 
choice groups where I think we will get into trouble with indeterminate 
content models. For instance, I don't believe this will work:
	((a | b| c | extension)?, d?, e?, extension?)

Without a required element between the choice group and the final extension 
element, this is non-deterministic. Most of our designs are made up of 
optional elements, very few things are actually required.

Any ideas?

..dan
	
---------------------------------------------------------------------------
Danny Vint

Specializing in Panoramic Images of California and the West
http://www.dvint.com

voice: 510-522-4703


     



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.