W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2012

Re: If attribute default present, 'use' must be optional

From: G. Ken Holman <gkholman@CraneSoftwrights.com>
Date: Fri, 23 Mar 2012 06:58:21 -0400
Message-Id: <>
To: <xmlschema-dev@w3.org>
At 2012-03-23 10:53 +0000, Pete Cordell wrote:
>Just curious...
>why in XSD section 3.2.3 Constraints on XML 
>Representations of Attribute Declarations, 
>Schema Representation Constraint: Attribute 
>Declaration Representation OK 
>(http://www.w3.org/TR/xmlschema11-1/#sec-src-attdecl) does it say:
>    2 If default and use are both present, use 
> must have the ·actual value· optional
>Why can't a schema designer choose to have a 
>mandatory attribute with a default value?

What would a default value mean if it never, 
ever, gets used because the instance *always* overrides it?

Would that not be misleading to someone?  Either 
the schema writer or the user or both?

. . . . . . . . Ken

Contact us for world-wide XML consulting and instructor-led training
Free 5-hour video lecture: XSLT/XPath 1.0 & 2.0 http://ude.my/uoui9h
Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/x/
G. Ken Holman                   mailto:gkholman@CraneSoftwrights.com
Google+ profile: https://plus.google.com/116832879756988317389/about
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal
Received on Friday, 23 March 2012 10:58:54 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:20 UTC