W3C home > Mailing lists > Public > www-html-editor@w3.org > October to December 2003

Possible error with XHTML 1.0 in XML Schema

From: Banerjee, Animesh (C)(STP) <Animesh.Banerjee@guidant.com>
Date: Fri, 17 Oct 2003 17:03:04 -0500
Message-ID: <205CA82E2191E64D8AB5877394959AFA01AC93D5@stpmse09.stp.guidant.com>
To: <www-html-editor@w3.org>

Dear sir/madam:

When attempting to validate the XHTML 1.0 Schema located at http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd in XML Spy version 5.0, I received an error saying:

"This schema doesn't appear to be valid by itself (as a part of another schema, it might still be OK): Schema error src-attribute.1 - default and fixed must not both be present for xs:attribute"

This error occured for the <style> element, and every other element with the following attribute declaration:
	
	<xs:attribute ref="xml:space" fixed="preserve"/>

Examining the XML Schema Recommendation for attribute declarations at http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-attributeat  I came across the following in section 3.2.3:

3.2.3 Constraints on XML Representations of Attribute Declarations

Schema Representation Constraint: Attribute Declaration Representation OK
In addition to the conditions imposed on <attribute> element information items by the schema for schemas, all of the following must be true:
1 default and fixed must not both be present.
2 If default and use are both present, use must have the ·actual value· optional.
3 If the item's parent is not <schema>, then all of the following must be true:
3.1 One of ref or name must be present, but not both.
3.2 If ref is present, then all of <simpleType>, form and type must be absent.
4 type and <simpleType> must not both be present.
5 The corresponding attribute declaration must satisfy the conditions set out in Constraints on Attribute Declaration Schema Components (§3.2.6).


My interpretation here is that rule 1 is being broken since in the xml schema (http://www.w3.org/2001/xml.xsd) we see that the space attribute is defined as:

<xs:attribute name="space" default="preserve">
		<xs:simpleType>
			<xs:restriction base="xs:NCName">
				<xs:enumeration value="default"/>
				<xs:enumeration value="preserve"/>
			</xs:restriction>
		</xs:simpleType>
</xs:attribute>

I look forward to your assistance in the resolution of this issue.

Thank you,

Animesh Banerjee.
Received on Monday, 20 October 2003 11:15:45 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 23:39:53 UTC