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] Is Schematron (using XPath 2.0) functionally a superset ofXML Schemas?

Rick Jelliffe asks:

> How do you express anything at the component level? 

There are various libraries out there that you can use to compose a set of 
XSD schema documents and get an API that exposes the component structure. 
For example, there's [1].  Our XML Screamer project used exactly that 
approach:  we took an off the shelf Java library to do all the hard work 
of resolving <xsd:include>, <xsd:redefine>, etc., and we just compiled our 
validators from the resulting component structures.  I'm fairly sure that 
Michael Kay has also said that the latest versions of Saxon will read in a 
set of schema documents and write out an XML file that directly reflects 
the resolved components, so you could write tools that extracted schema 
information from that.

Trying to figure out the effective schema for a set of composed schema 
documents is like handing a tool a C source file and a pile of headers 
that use #define and #ifdef and then asking the tool to determine the 
names and types of fields in an arbitrary struct.  You can tempt yourself 
into trying it in the simple cases, but you'll ultimately find you're 
working at the wrong level.  Run it all through CPP and the job gets easy. 
 Same for schema:  there are a set of constructs available at the source 
syntax level, and they allow you to do things like inherit facets from 
types defined in other files.   The purpose of the component model is 
precisely to make sure that there is a level of the design in which most 
of the indirections are resolved, and which sets out things like the net 
effective content model for an element.


[1] http://www.eclipse.org/modeling/mdt/?project=xsd#xsd

Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142

[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