Re: Choice of subelements by attribute value?

Bjoern Martin wrote:
> 
> Hi (me again ;)
> 
> I wondered if there is a possibility to restrict the appearance of
> certain subelements of an element by the value of an attribute.

No, W3C XML Schema is very strict on avoiding any possible ambiguity and
you would have to use different element names to make this possible
(getHTTPdata, getHTTPSdata, getFILEdata) with W3C XML Schema alone.

You can also add extra tests in addition to W3C XML Schema as Jeff
Rafter pointed out, but it's actually (IMHO) one of the key differences
between W3C XML Schema and alternatives such as RELAX NG where these
constructs are trivial to describe.

Eric
-- 
Pour y voir plus clair dans la nebuleuse XML...
                                          http://dyomedea.com/formation/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
http://xsltunit.org      http://4xt.org           http://examplotron.org
------------------------------------------------------------------------

Received on Friday, 22 June 2001 11:17:22 UTC