- From: Jeni Tennison <jeni@jenitennison.com>
- Date: Tue, 14 Jan 2003 16:38:04 +0000
- To: rainerbecker.mail@t-online.de (Rainer Becker)
- CC: xmlschema-dev@w3.org
Hi Rainer, > at that point I was sure that "is fixed with the same value" > meant, that fixed can only be used in both, the base type and > the restricted type with an identical value , but unfortunately, > the following two validate just fine. > > <xsd:element name="B" type="xsd:string" /> > <xsd:element name="B" type="xsd:string" fixed="test"/> > > <xsd:element name="B" type="xsd:string" default="test" /> > <xsd:element name="B" type="xsd:string" fixed="test" /> > > Question: What does fixed with the same value mean?, or > is it a parser error, please help! The three things that are legal are: (a) when the base declaration doesn't have a default or fixed value (b) when the base declaration has a default value (c) when the base declaration has a fixed value and the restricted declaration has the same, fixed value In the examples above, the first satisfies (a) because the base declaration doesn't have a default or fixed value, so it's legal (regardless of what the restricted declaration looks like). The second satisfies (b) because the base declaration has a default value, so it's legal (regardless of what the restricted declaration looks like). Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/
Received on Tuesday, 14 January 2003 11:38:48 UTC