![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - Re: Duplicate attribute uses (Xerces bug?) >Thread Next - Re: Duplicate attribute uses (Xerces bug?) Re: Duplicate attribute uses (Xerces bug?)To: kbuchcik@---------.-- Date: 9/12/2005 7:29:00 PM
Hmm, I think you are right... According with the spec the {attribute
uses} will be
***
{attribute uses} A union of sets of attribute uses as follows:
1 The set of attribute uses corresponding to the <attribute> [children],
if any.
2 The {attribute uses} of the attribute groups =B7resolved=B7 to by the
=B7actual value=B7s of the ref [attribute] of the <attributeGroup>
[children], if any.
3 The {attribute uses} of the type definition =B7resolved=B7 to by the
=B7actual value=B7 of the base [attribute], unless the <restriction>
alternative is chosen, in which case some members of that type
definition's {attribute uses} may not be included, namely those whose
{attribute declaration}'s {name} and {target namespace} are the same as
one of the following:
3.1 The {name} and {target namespace} of the {attribute declaration} of
an attribute use in the set per clause 1 or clause 2 above;
3.2 what would have been the {name} and {target namespace} of the
{attribute declaration} of an attribute use in the set per clause 1
above but for the =B7actual value=B7 of the use [attribute] of the releva=
nt
<attribute> among the [children] of <restriction> being prohibited.
***
a set consisting of one attribute use corresponding to
<xsd:attribute name="boo"/>
from the "type" complex type.
Now, the error reported by Xerces is wrong but do you see a benefit of
allowing this? IMO a duplicate attribute element should be an error.
Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
www.---.com
Kasimier Buchcik wrote:
> On Mon, 2005-09-12 at 15:00 +0300, George Cristian Bina wrote:
>
>>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.
>
>
> Yes, but in
> http://www.w3.org/TR/xmlschema-1/#Attribute_Declaration_details
>
> we have
> "if the <attribute> element information item has <complexType> or
> <attributeGroup> as an ancestor and the ref [attribute] is absent, it
> corresponds to an attribute use with properties as follows (unless
> use='prohibited', in which case the item corresponds to nothing at
> all):"
>
> Prohibiting an attribute use does not create an attribute use, thus
> we don't have duplicate attribute uses at the component level here.
>
> But I'm not sure if it was intended to rule out duplicates at the
> XML representation level as well.
>
> Regards,
>
> Kasimier
From K.Buchcik@4... Mon Sep 12 14:06:59 2005
Received: from lisa.w3.org ([128.30.52.41])
by fr | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
