Re: Top-level any

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.

ht
-- 
  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