W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2001

Re: Simple question on elements constraints

From: Michael Anderson <michael@research.canon.com.au>
Date: Thu, 25 Jan 2001 11:21:03 +1100
Message-ID: <3A6F716F.7013E057@research.canon.com.au>
To: francis@redrice.com
Cc: Adalbert Wysocki <waldi@imediation.com>, xmlschema-dev@w3.org
Francis Norton wrote:

> The second question has to do with defaults. "fixed" and "default" only
> apply to attribute declarations (see
> http://www.w3.org/TR/xmlschema-0/#ref36) and are specified via the "use"
> and "value" attributes, eg you could add:
>       <xsd:attribute name="weather" use="fixed" value="wet" />
> after the </xsd:sequence> above, and while both XML Spy 3.5 and xsv will
> allow the "weather" attribute to be absent, neither will allow it to be
> empty or to have any value but "wet".

Sorry, my previous mail was a bit verbose.  My main problem has to do with
the above example applied to an element.  If I have:

<xsd:element name="weather" fixed="wet"/>

and an information item


Is the "weather" content considered to be absent, thus be allowed, and given
a value of "wet"?
Is the "weather" content considered empty, thus not be allowed?

If the "weather" content _is_ considered to be absent, how could I specify
the content to be empty?

Received on Wednesday, 24 January 2001 19:21:15 UTC

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