Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: Default and Fixed Values of attributes

From: "Michael Kay" <mike@--------.--->
To: "'Hans Teijgeler'" <hans.teijgeler@--------.-->, "'XML-Schema Developers Forum'" <xmlschema-dev@--.--->
Date: 2/14/2005 12:30:00 PM
 
1)   In 2.1 it says that the stuff in 2.1.3 must be true IF B is in the same
target namespace as R. That is interesting. What if the schema that defines
R is imported in the schema that defines B? 
 
No, it's not saying that B must be in the same namespace as R: it's saying
that if B has an attribute with the same expanded name as an attribute in R,
then certain conditions must hold. 
 
2)   I would be obliged to receive your reaction on the other questions in
my message, viz:
*         Whether or not the definition of a default or fixed value should
have as a consequence that the use constraint should become "optional" (for
default values) or even should be removed at all (for fixed values).  
 
In section 3.2.3 is the rule: 
 
 
1 default and fixed must not both be present.
2 If default and use are both present, use must have the
<http://www.w3.org/TR/xmlschema-1/#key-vv> .actual value. optional. 
 
 
I wouldn't expect to see a rule that the presence of a fixed or default
value changes the {required} value, and I'm pretty sure there is no such
rule.
 
 
*         Can you explain the rationale for the split between
specialization(typing)_by_extension and specialization_by_restriction? From
a data modelling point of view that is illogical, because adding an
attribute or child element also constitutes an extra constraint, and besides
that it is highly inconvenient and causes a lot of hassle.
 
Others would be better qualified than me to comment on the rationale. It
does seem to me that extension and restriction are rather different
operations. The main difficulty I have in practice is that if one element A
allows three children P, Q, and R, and another element B allows only P and
Q, then it's not clear whether B should be derived from A by restriction, or
A derived from B by extension. Which option you choose doesn't affect the
result of validation, but it can have a significant impact when you start
writing schema-aware XSLT and XQuery. (Of course, this is an old dilemma in
object-oriented design.)
 
Michael Kay
http://www.saxonica.com/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent