W3C home > Mailing lists > Public > xmlschema-dev@w3.org > November 2009

Possible to restrict top-level xs:element names?

From: kennardconsulting <richard@kennardconsulting.com>
Date: Thu, 5 Nov 2009 22:58:55 -0800 (PST)
Message-ID: <26227610.post@talk.nabble.com>
To: xmlschema-dev@w3.org
Hi guys,

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

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

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

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


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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:17 UTC