Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.11.0
-
None
Description
If I validate the following XSD document in 1.0 mode, I get a NullPointerException.
I tested on the xml-schema-1.1-dev branch.
--------------- XSD ------------------------------------
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="test">
<xs:simpleType>
<xs:restriction base="xs:date">
<xs:explicitTimezone value="optional"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:schema>
-------------------------------------------------------------
---------------- NullPointerException -------------------------------
Exception in thread "main" java.lang.NullPointerException
at org.apache.xerces.impl.xs.traversers.XSDAbstractTraverser.traverseFacets(XSDAbstractTraverser.java:601)
at org.apache.xerces.impl.xs.traversers.XSDSimpleTypeTraverser.getSimpleType(XSDSimpleTypeTraverser.java:434)
at org.apache.xerces.impl.xs.traversers.XSDSimpleTypeTraverser.traverseLocal(XSDSimpleTypeTraverser.java:158)
at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseNamedElement(XSDElementTraverser.java:398)
at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseGlobal(XSDElementTraverser.java:241)
at org.apache.xerces.impl.xs.traversers.XSDHandler.traverseSchemas(XSDHandler.java:1652)
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:263)
---------------------------------------------------------------