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

minInclusive facet validated against lexical space, not value space

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.6.2
    • 2.6.2
    • XML Schema API
    • None

    Description

      If I have a type thus:

      <xsd:element name='Reason'>
      <xsd:simpleType>
      <xsd:restriction base='xsd:integer'>
      <xsd:pattern value='[0-9][0-9]' />
      <xsd:maxInclusive value='29' />
      <xsd:minInclusive value='5' />
      </xsd:restriction>
      </xsd:simpleType>
      </xsd:element>

      I get the error message:

      cvc-pattern-valid: Value '5' is not facet-valid with respect to pattern '[0-9][0-9]' for type 'null'.

      5 is from the value space of "integer". It appears that xerces is checking the Value '5' against the lexical space of the derived type.

      The spec: http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#dc-minInclusive

      Says:
      A value from the - value space- of the

      {base type definition}

      .

      Attachments

        1. a.xsd
          0.6 kB
          David Sheldon
        2. new-a.xsd
          0.7 kB
          David Sheldon

        Activity

          People

            sandygao@ca.ibm.com Sandy Gao
            davidsheldon David Sheldon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: