[ 
https://issues.apache.org/jira/browse/XERCESJ-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13797830#comment-13797830
 ] 

Mukul Gandhi commented on XERCESJ-1615:
---------------------------------------

I can see that if the schema document redefined.xsd that the schema you've 
posted refers to is not provided, a NullPointerException occurs. But if 
redefined.xsd is provided as well, an exception doesn't come and the XSD 
validator produces a legitimate response.

I agree, in this case ideally a proper error must be generated instead of 
NullPointerException. In the meantime, users using our XSD engine withing a 
programming environment, may write a suitable exception handler to handle this 
exception gracefully.

Moreover, if its clearly obvious (in some cases) that a schema document like 
redefined.xsd is needed, then just provide it instead of expecting the XSD 
validator to handle every kinds of exception.

> 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
>            Assignee: Mukul Gandhi
>
> 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 was sent by Atlassian JIRA
(v6.1#6144)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to