Uploaded image for project: 'Xerces2-J'
  1. Xerces2-J
  2. XERCESJ-1625

NullPointerException when validating an XSD, that contains "explicitTimezone" facet, in 1.0 mode

    XMLWordPrintableJSON

Details

    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)
      ---------------------------------------------------------------

      Attachments

        Activity

          People

            mukul_gandhi Mukul Gandhi
            octavian.nadolu Octavian Nadolu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: