[ https://issues.apache.org/jira/browse/XERCESJ-1603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mukul Gandhi updated XERCESJ-1603: ---------------------------------- Fix Version/s: 2.12.0 > 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 > Assignee: Mukul Gandhi > Priority: Minor > Fix For: 2.12.0 > > > 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 was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: j-dev-unsubscr...@xerces.apache.org For additional commands, e-mail: j-dev-h...@xerces.apache.org