W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2002

RE: schema validation error

From: Marko Asplund <aspa@kronodoc.fi>
Date: Wed, 17 Apr 2002 13:43:07 +0300 (EEST)
To: Priscilla Walmsley <priscilla@walmsley.com>
Cc: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Message-ID: <Pine.LNX.4.44.0204171321410.11964-100000@gamay.kronodoc.fi>
On Tue, 16 Apr 2002, Priscilla Walmsley wrote:

> I've seen this message before, when you are trying to restrict a simple 
> type to result in a complex type with simple content.  For example, if the 
> type for one of your elements looks like:
> 
> ...
> It should really be:
> 
> <xs:element name="EXT">
> 	<xs:simpleType>		
> 		<xs:restriction base="xs:integer">
> 			<xs:minExclusive value="1"/>
> 		</xs:restriction>
> 	</xs:simpleType>
> </xs:element>

thanks very much for your answer.

the above schema fragment seems to work but it misses an attribute
declaration. the relevant part of the original schema is as follows:

<xsd:element name = "EXT">
	<xsd:complexType>
		<xsd:simpleContent>
			<xsd:restriction base = "xsd:string">
				<xsd:maxLength value = "1024"/>
				<xsd:minLength value = "0"/>
				<xsd:attribute name = "IDREF" use = "required" type = "xsd:IDREF"/>
			</xsd:restriction>
		</xsd:simpleContent>
	</xsd:complexType>
</xsd:element>

how do i add the attribute declaration to your schema fragment?


best regards,
-- 
	aspa
Received on Wednesday, 17 April 2002 06:43:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:30 GMT