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

assertions on, simpleType with variety list whose itemType is union, do not evaluate

    XMLWordPrintableJSON

Details

    Description

      An XML Schema 1.1 example like following, is not handled correctly by XercesJ XML Schema 1.1 validator.

      XML instance document,

      <?xml version="1.0"?>
      <X>3 2012-08-07</X>

      Corresponding XML Schema 1.1 document,

      <?xml version="1.0"?>
      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

      <xs:element name="X">
      <xs:simpleType>
      <xs:list itemType="INT_AND_DATE"/>
      </xs:simpleType>
      </xs:element>

      <xs:simpleType name="INT_AND_DATE">
      <xs:union memberTypes="INT_TYPE xs:date"/>
      </xs:simpleType>

      <xs:simpleType name="INT_TYPE">
      <xs:restriction base="xs:integer">
      <xs:assertion test="$value mod 2 = 0"/>
      </xs:restriction>
      </xs:simpleType>

      </xs:schema>

      The above cited XML Schema 1.1 validation example, should result in an invalid outcome (since the list item 3, is not valid with any of memberTypes of xs:union).

      Attachments

        Activity

          People

            mukul_gandhi Mukul Gandhi
            mukul_gandhi Mukul Gandhi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: