Octavian Nadolu created XERCESJ-1603:
----------------------------------------
Summary: NullPointerException when parsing an XML Schema 1.1 that
contains openContent
Key: XERCESJ-1603
URL: https://issues.apache.org/jira/browse/XERCESJ-1603
Project: Xerces2-J
Issue Type: Bug
Components: XML Schema 1.1 Structures
Affects Versions: 2.11.0
Reporter: Octavian Nadolu
Priority: Minor
When I parse the following schema I get a NullPointerException. The open
content element from the schema does not have an wildcard set yet. So, Xerces
presents correctly the error about the open content but then it gets a
NullPointerException.
I tested on the xml-schema-1.1-dev branch.
-------------Schema-----------------------------
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:defaultOpenContent mode="interleave">
<xs:any namespace="##targetNamespace"/>
</xs:defaultOpenContent>
<xs:complexType name="mainCT">
<xs:all>
<xs:element name="elemA" type="mainCT"/>
</xs:all>
</xs:complexType>
<xs:complexType name="bCT">
<xs:complexContent>
<xs:extension base="mainCT">
<xs:openContent mode="interleave">
</xs:openContent>
<xs:all>
<xs:element name="elemB"/>
</xs:all>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
------------------------------------------------------
-------------------- NPE----------------------------
Exception in thread "main" java.lang.NullPointerException
at
org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexContent(XSDComplexTypeTraverser.java:1304)
at
org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexTypeDecl(XSDComplexTypeTraverser.java:455)
at
org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.traverseGlobal(XSDComplexTypeTraverser.java:208)
at
org.apache.xerces.impl.xs.traversers.XSDHandler.traverseSchemas(XSDHandler.java:1649)
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)
at XercesValidation.main(XercesValidation.java:256)
--
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]