W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2004

Validation of schema element with non-schema attribute

From: Noga Atsil <Noga.Atsil@smarteam.com>
Date: Thu, 19 Feb 2004 12:21:47 +0200
Message-ID: <FEF694FBF6A41F428D539DFC69ACE901253609@ILEXC05.SMART.INTRA>
To: <xmlschema-dev@w3.org>
Cc: "Keren Friedman" <Keren.Friedman@smarteam.com>
Suppose I have the following two schemas, where the first defines an attribute, and the second uses the first:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:attribute name="att" type="xs:integer"/>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:p="NS"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:import  namespace="NS" schemaLocation="NS.xsd"/>
	<xs:element name="myElement">
			<xs:attribute name="myAttribute" type="xs:string" p:att="value"/>

According to XML Schema spec - should this attribute be validated by parsers? 
It is defined as : <xs:anyAttribute namespace="##other" processContents="lax" />
And the specification says that:
	If the item, or any items among its [children] <http://www.w3.org/TR/xml-infoset/> if it's an element information item, has a uniquely determined declaration available, it must be ·valid· with respect to that definition, that is, ·validate· where you can, don't worry when you can't

It is not being validated in parsers I am using.... (XmlSpy, for instance). Is it a parser bug, or should I do something else in order for this attribute to be validated?
(Currently, even its name is not being validated)

Received on Thursday, 19 February 2004 05:23:12 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:18 UTC