Re: Attribute with fixed value in derived types
Florent Georges <[email protected]> Wed, 27 Jun 2012 11:37:57 +0100 (BST)
| Newsgroups | gmane.text.xml.schema.devel |
|---|---|
| Message-ID | <[email protected]> |
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/