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

xsi:type in element of union datatype makes validation fail. Example from XML Schema spec fails.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.10.0
    • None
    • None
    • Java 7 x64, Linux Ubuntu 14.04 x64

    Description

      XML Schema Part 2: Datatypes Second Edition, section 2.5.1.3 Union datatypes (http://www.w3.org/TR/xmlschema-2/#union-datatypes) specifies that xsi:type attribute may be used to tell the exact variant of a union type used in the instance element.
      There is an example on how to use xsi:type attribute. That example does not pass in xerces-j:
      cvc-elt.4.3: Type 'xsd:string' is not validly derived from the type definition, 'null', of element 'size'.

      The sample XSD and instance document are available from https://www.dropbox.com/s/th1v2ts88cxad8x/union_datatype_xsi_type.zip?dl=0

      Attachments

        Activity

          People

            Unassigned Unassigned
            npak Nikolay Pakulin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: