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

[xmlschema-dev] <none>

From: Paul Jakubik <pauljakubik@yahoo.com>
Date: Thu, 19 Apr 2001 12:55:52 -0700 (PDT)
Message-ID: <20010419195552.54111.qmail@web11006.mail.yahoo.com>
To: xmlschema-dev@w3.org
I am trying to understand what the XML Schema PR has
to say about using default and fixed when specifying
attributes and elements.

This is what I think is true about default and fixed
in attributes (please correct me if I am wrong):
1)If an attribute has a default value specified, the
attribute's use can not be required. 

2)If the attribute is fixed, then its use may be
required or optional.

3)If the attribute does not appear, the default or
fixed value will be used for that attribute (when
parsing with a validating parser, the parse results
should make it appear that the attribute was provided
and using the default or fixed value).

I am a little more confused with the behavior of
default and fixed for elements, so I have some
Q1: The primer says that if a default is provided,
minOccurs must be 0 for that element. I could not find
anything in the structure document that says the same
thing. Could someone point me to the appropriate part
of the PR?

Q2: The default value should be used when the element
is empty. Should the default value also be used when
the element does not appear in the document being

Q3: If the answer to Q2 is no, then why require
minOccurs to be 0 if a default is specified.

Q4: Does fixed work the same way in elements as it
does in attributes? If a fixed value is specified for
an element, should that value be used if the element
is missing or empty?

If possible I would appreciate it if answers were
accompanied by pointers to sections of the Schema PR
so I can understand the rationale and not just the
answer. Of course just an answer is better than

Thanks for the help,


Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
Received on Thursday, 19 April 2001 15:56:00 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:51 UTC