Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Duplicate attribute uses (Xerces bug?)

From: George Cristian Bina <george@----.-->
To: kbuchcik@---------.--
Date: 9/12/2005 6:01:00 PM
Hi,

See http://www.w3.org/TR/xmlschema-1/#ct-props-correct
4 Two distinct attribute declarations in the {attribute uses} must not 
have identical {name}s and {target namespace}s.

Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
www.---.com


Kasimier Buchcik wrote:
> Hi,
> 
> Don't worry; this is not related to schema construction.
> I get an error report from Xerces-J 2.7.1 when
> prohibiting and defining an equal attribute use in the
> same type.
> 
> attr.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">
> 		<xsd:complexContent>
> 			<xsd:restriction base="f:base">
> 				<xsd:attribute name="boo" use="prohibited"/>
> 				<xsd:attribute name="boo"/>
> 			</xsd:restriction>
> 		</xsd:complexContent>
> 	</xsd:complexType>
> 
> 	<xsd:element name="foo" type="f:type"/>
> </xsd:schema>
> 
> attr.xml
> --------
> <foo xmlns="urn:test:foo"
> 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> 	xsi:schemaLocation="urn:test:foo attr.xsd"/>
> 
> XSV: no errors
> Xerces:
> attr.xsd:14,32: (Error) ct-props-correct.4: Error for type 'type'.
> Duplicate attribute uses with the same name and target namespace are
> specified.  Name of duplicate attribute use is 'boo'.
> 
> IFAIK prohibiting an attribute does not create an attribute use
> component and is just a mechanism to prohibit attribute uses
> of the base type. So I see no error here.
> Thoughts?
> 
> Regards,
> 
> Kasimier
> 
> 
> 
> 
> 

From K.Buchcik@4... Mon Sep 12 12:06:53 2005
Received: from lisa.w3.org ([128.30.52.41])
	by 


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent