[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Duplicate attribute uses (Xerces bug?)

From: Kasimier Buchcik <kbuchcik@4commerce.de>
Date: Mon, 12 Sep 2005 15:05:12 +0200
To: kbuchcik@4commerce.de
Cc: XML-SCHEMA <xmlschema-dev@w3.org>
Message-Id: <1126530312.1272.30.camel@librax>
xsd attribute xerces

Hi,

XSV 2.10 seems to have problems here as well:

attr-2.xsd
----------
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	targetNamespace="urn:test:foo"
	xmlns:f="urn:test:foo">

	<xsd:complexType name="base">
		<xsd:attribute name="boo" use="optional"/>
	</xsd:complexType>

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


	<xsd:complexType name="type-2">
		<xsd:attribute name="boo" use="prohibited"/>
		<xsd:attribute name="boo"/>
	</xsd:complexType>

	<xsd:element name="foo" type="f:type-1"/>
</xsd:schema>

attr-2.xml
----------
<foo xmlns="urn:test:foo"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="urn:test:foo attr-2.xsd"
	boo="lala"/>

XSV:
attr.xml:1,22: undeclared attribute {None}:boo

If we change the type of the element declaration to "f:type-2",
then XSV reports no errors.

This is inconsistent, as one would expect the attribute uses
of "f:type-1" and "f:type-2" to be equal.

Thoughts?

Regards,

Kasimier
Received on Monday, 12 September 2005 13:07:26 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.