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

Base type of xs:negativeInteger is reported as xs:integer instead of xs:nonPositiveInteger.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.9.1
    • 2.10.0
    • None

    Description

      Xerces 2.9.1 has a bug in its construction of the XML Schema 1.0 simple type hierarchy [1]. The base type of xs:negativeInteger is assigned to be xs:integer instead of xs:nonPositiveInteger. This bug causes the following instance document to be reported as invalid with respect to the schema (below it):

      <root xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:type="xs:negativeInteger">-9</root>

      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:element name="root" type="xs:nonPositiveInteger"/>
      </xs:schema>

      [1] http://www.w3.org/TR/xmlschema-2/#built-in-datatypes

      Attachments

        Activity

          People

            mrglavas@ca.ibm.com Michael Glavassevich
            mrglavas@ca.ibm.com Michael Glavassevich
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: