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


Help: OASIS Mailing Lists Help | MarkMail Help



   W3C schema, RelaxNG, and Schematron

[ Lists Home | Date Index | Thread Index ]

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 

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?

Danny Vint

Specializing in Panoramic Images of California and the West

voice: 510-522-4703



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

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