Re: Restricting the schema for schemas

Jasmin Wason <jlw98r@ecs.soton.ac.uk> writes:

> I have a program that parses XML Schemas and I would like to specify a
> few restrictions on the XML Schemas it can read. For example I would
> like to specify that it will only process XML Schemas that allow element
> names to be a maximum of 20 characters long.
> 
> Would it be possible to write an XML Schema that is a subset of the
> schema for schemas ( http://www.w3.org/2001/XMLSchema.xsd ) using
> restriction and then schema validate other XML Schemas against it?

You can define a schema which defines (or re-defines) types based on
type definitions in the XML Schema schema for schemas.  You can ask a
validator to use that schema to validate other schema documents.  What 
you probably can't do is get a schema validator to treat your schema
as if it were the schema for schemas in its own internal processes.

So if you only use restriction, you're probably OK, but if you use
extension, you will lose.

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/

Received on Thursday, 20 September 2001 05:52:51 UTC