W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2003

Re: Top-level any

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 06 Feb 2003 15:48:19 +0000
To: robin.berjon@expway.fr
Cc: xmlschema-dev@w3.org
Message-ID: <f5b4r7h8l6k.fsf@erasmus.inf.ed.ac.uk>

Robin Berjon <robin.berjon@expway.fr> writes:

> I don't think this is possible, but I might have missed something. Is
> it possible to have a global <any> in order to produce a schema for a
> vocabulary that will occur solely embedded within random XML? I'd like
> to validate subtrees containing my language without knowing anything
> about the enclosing tree, especially nothing about the root
> element. It'd be jolly useful.

You don't need to do anything beyond associating your namespace with
your schema, either via command line, or xsi:schemaLocation in the
instance, or the namespace URI of your namespace.  The REC defines
schema-validation so that a schema-validator may use xs:anyType for
any element it doesn't recognise, starting at the root.  In the case
you are interested in, this will recurse until it finds your stuff,
then start validating for real.

XSV supports this pattern, for one, I can't speak for the others.

  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                      Half-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/
 [mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Thursday, 6 February 2003 10:48:20 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:09 UTC