W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2000

Re: restricting namespace usage within a document?

From: Eric van der Vlist <vdv@dyomedea.com>
Date: Tue, 12 Dec 2000 19:17:11 +0100
Message-ID: <3A366BA7.64205774@dyomedea.com>
To: David Waite <dwaite@jabber.com>
CC: xmlschema-dev@w3.org
David Waite wrote:
> Is there a way via XML Schemas (or some other validation method) to
> restrict the usage of namespaces within a document? I am both interested
> in restricting which namespaces can be used within a document as
> children of a certain element, and restricting all uses of namespaces
> except under certain elements. DTDs do not provide this: I was under the
> impression that XML Schemas did, but I have been unable to find any
> information on whether or not my assumption was correct.

W3C XML Schemas gives you a full control on the elements that can be
included under another element and, unless you specify it, no other
element in whatever namespace will be allowed than those you've listed.

It's, on the contrary, when you want to allow undetermined elements from
one or more namespaces that you need to specify it using a xsd:any [1]
(xsd:anyAttribute [2] for attributes) and this can only be done element
per element...

Hope this helps.


[1] http://www.w3.org/TR/2000/CR-xmlschema-1-20001024/#element-any

> (please CC me directly, I am not on the mailing list)
> -David Waite

Eric van der Vlist       Dyomedea                    http://dyomedea.com
http://xmlfr.org         http://4xt.org              http://ducotede.com
Received on Tuesday, 12 December 2000 13:15:22 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:48 UTC