W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2005

Re: Duplicate attribute uses (Xerces bug?)

From: Kasimier Buchcik <K.Buchcik@4commerce.de>
Date: Wed, 21 Sep 2005 12:05:00 +0200
To: kbuchcik@4commerce.de
Cc: XML-SCHEMA <xmlschema-dev@w3.org>
Message-Id: <1127297100.1274.26.camel@librax>


Added results of SQC and Saxon 8.5.1; update of XSV result
(see below).

On Mon, 2005-09-12 at 16:44 +0200, Kasimier Buchcik wrote:
> Hi,


> Additionally generating a warning if prohibition is used with
> extensions would be good. The following does not produce neither
> a warning nor an error with Xerces-J and XSV:

> <xsd:complexType name="base">
> 	<xsd:attribute name="boo" use="optional"/>
> </xsd:complexType>
> <xsd:complexType name="type-1">
> 	<xsd:complexContent>
> 		<xsd:extension base="f:base">				
> 			<xsd:attribute name="boo" use="prohibited"/>
> 		</xsd:extension>
> 	</xsd:complexContent>
> </xsd:complexType>

<foo xmlns="urn:test:foo"
	xsi:schemaLocation="urn:test:foo attr-2.xsd" boo="lala"/>

SQC (no errors):

PROCESSING p:\libxml2-lab\tests\2005-09-12\attr-2.xsd time :
2005-09-21T12:02:22 ...
p:\libxml2-lab\tests\2005-09-12\attr-2.xsd (file 1 of 1) now being
read ...
end time = 2005-09-21T12:02:22

Saxon 8.5.1 (error):

Error on line 10 of file:/p:/libxml2-lab/tests/2005-09-12/attr-2.xsd:
  Attribute @boo appears more than once in attribute group
Warning: The schema is invalid
Validation error 
  Cannot validate <foo>: no element declaration available
Validation of source document failed

XSV (error):

<schemaError char="2" line="10" phase="instance"
attempt to extend with an attribute already declared {{None}:boo}

And once again, to have it one below the other:

Xerces-j 2.7.1: reports no errors


Received on Wednesday, 21 September 2005 10:05:07 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:08 UTC