You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Octavian Nadolu (JIRA)" <xe...@xml.apache.org> on 2013/10/17 11:43:42 UTC

[jira] [Reopened] (XERCESJ-1615) Error not reported on duplicate attributes

     [ https://issues.apache.org/jira/browse/XERCESJ-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Octavian Nadolu reopened XERCESJ-1615:
--------------------------------------


After the modifications that you made to fix this issue, I found a NullPointerException. You can reproduce this using the following schema.

-------- schema.xsd -------------------- 
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:redefine schemaLocation="redefined.xsd">
        <xs:attributeGroup name="attrGrp">
            <xs:attributeGroup ref="attrGrp"/>
            <xs:attributeGroup ref="attrGrp"/>
        </xs:attributeGroup>
    </xs:redefine>
</xs:schema>
-------------------------------------------------------

---NPE---------------------------
Exception in thread "main" java.lang.NullPointerException
	at org.apache.xerces.impl.xs.traversers.XSDAbstractTraverser.traverseAttrsAndAttrGrps(XSDAbstractTraverser.java:834)
	at org.apache.xerces.impl.xs.traversers.XSDAttributeGroupTraverser.traverseGlobal(XSDAttributeGroupTraverser.java:142)
	at org.apache.xerces.impl.xs.traversers.XSDHandler.traverseSchemas(XSDHandler.java:1620)
	at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:728)
	at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:644)
	at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:611)
	at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:577)
	at org.apache.xerces.jaxp.validation.BaseSchemaFactory.newSchema(BaseSchemaFactory.java:223)
------------------------------------

> 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: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org