Possible to restrict top-level xs:element names?

Hi guys,

I'm generating a bunch of XML Schemas that look roughly like:

<xs:schema ...>
   <xs:element name="foo"/>
   <xs:element name="bar"/>
</xs:schema>

You can see the actual ones  http://metawidget.org/xsd here . My question
is, this schema allows me to declare 'foo' and 'bar' in my XML document, but
doesn't restrict me declaring, say, 'baz'. I was expecting something like...

<xs:schema final="#all">

....so that I could 'close' the set of possible xs:element names. Or maybe
that the set was closed by default and I'd need...

<xs:schema ...>
   <xs:element name="foo"/>
   <xs:element name="bar"/>
   <xs:any />
</xs:schema>

....to make it open. But instead the set of top-level xs:element names
appears 'open' by default and I can't find a way to close it? I have looked
all over the specs and in this forum, sorry if I'm being dumb.

Regards,

Richard.
-- 
View this message in context: http://old.nabble.com/Possible-to-restrict-top-level-xs%3Aelement-names--tp26227610p26227610.html
Sent from the w3.org - xmlschema-dev mailing list archive at Nabble.com.

Received on Friday, 6 November 2009 18:52:00 UTC