Re: Simple question on elements constraints

Francis Norton wrote:
<snip>

> 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

<weather></weather>

Is the "weather" content considered to be absent, thus be allowed, and given
a value of "wet"?
OR
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?

cheers,
  mick.

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