[
https://issues.apache.org/jira/browse/XERCESJ-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13683307#comment-13683307
]
Mukul Gandhi commented on XERCESJ-1615:
---------------------------------------
I agree that sibling <attributeGroup> elements having same expanded names,
within a complex type definition should ideally be raised as an error or
warning. Although I can't see this explicitly mentioned within the spec.
It seems, Xerces is deduplicating the attribute uses with same names, that
effectively produces the right complexType component wrt <attributeGroup>
processing. Probably its right to additionally produce an error/warning for the
example like that is cited. I would personally like to let the sibling
<attributeGroup> elements having same name traversed as they are now, at the
end of which we can produce a warning (not an error, which would allow us to
reuse the current intent of the algorithm) mentioning occurrence of duplicate
<attributeGroup> references.
I would try to see if I can produce a fix for this.
> Error not reported on duplicate attributes
> ------------------------------------------
>
> Key: XERCESJ-1615
> URL: https://issues.apache.org/jira/browse/XERCESJ-1615
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.0 Structures, XML Schema 1.1 Structures
> Affects Versions: 2.11.0
> Reporter: Octavian Nadolu
>
> If I validate the following schema Xerces does not complain about the the
> duplicate attribute. The same attribute group is referred twice.
> You can reproduce the issue on the xml-schema-1.1-dev branch.
> -------- schema.xsd --------------------
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified">
> <xs:complexType name="baseType">
> <xs:attributeGroup ref="globalAttributes"/>
> <xs:attributeGroup ref="globalAttributes"/>
> </xs:complexType>
>
> <xs:attributeGroup name="globalAttributes">
> <xs:attribute name="id" type="xs:ID"/>
> </xs:attributeGroup>
> </xs:schema>
> -------------------------------------------------------
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]