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

Re: Attribute with fixed value in derived types

From: Florent Georges <lists@fgeorges.org>
Date: Wed, 27 Jun 2012 11:37:57 +0100 (BST)
Message-ID: <1340793477.80343.YahooMailNeo@web29020.mail.ird.yahoo.com>
To: Michael Kay <mike@saxonica.com>, "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Michael Kay wrote:

  Hi Mike,

  Thank you for your response.

> I suspect that you have to first define a restriction of the type in
> which the attribute has a fixed value, and then define an extension
> of the restricted type.

  I am afraid I don't see exactly what you mean.  How can I define an
extension of a simple type within the extension of a complex type
(within an attribute redefinition)?  And if I could, that would then
allow more values for the attribute, not set a fixed value, wouldn't
it?  But I'm sure I just missed something...

> Or in XSD 1.1, as I discovered recently on this list, you can add an
> assertion as part of the extension, so you could define the fixed
> value by means of an assertion and thereby avoid the restriction
> step.  (But you wanted an XSD 1.0 solution...)

  That's exactly why I asked for 1.0 ;-)

Florent Georges
Received on Wednesday, 27 June 2012 10:38:31 UTC

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