Re: Attribute with fixed value in derived types

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
http://fgeorges.org/
http://h2oconsulting.be/

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