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

PSVI wrong for laxly validated element with validated attribute

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.9.1
    • 2.10.0
    • XML Schema API
    • None

    Description

      Credit to Henry Zongaro for finding this bug.

      If an element is laxly assessed and it has an attribute that is strictly assessed, the [validation attempted] property of the element's PSVI should be "partial" according to <http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#sic-e-outcome>. However, Xerces seems to set that property to "none" unless the element also had a child element whose [validation attempted] not "none".

      Using the two instances below, they both should have the "unknown" element with a validation attempted field as "partial", but only the second instance has that (the first one has validation attempted field as "none")

      ----- Problem recreation ---------------

      public static final String SCHEMA =
      "<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'" +
      " xmlns:my='http://example.org'" +
      " targetNamespace='http://example.org'" +
      " elementFormDefault='qualified'>\n" +
      " <xs:attribute name='var' type='xs:integer'/>\n" +

      " <xs:element name='foo'>\n" +
      " <xs:complexType>\n" +
      " <xs:sequence/>\n" +
      " </xs:complexType>\n" +
      " </xs:element>\n" +
      "</xs:schema>\n";

      public static final String INPUT1 =
      "<unknown xmlns:my='http://example.org' my:var='7'/>";

      public static final String INPUT2 =
      "<unknown xmlns:my='http://example.org' my:var='7'><my:foo/></unknown>";

      Attachments

        1. XMLSchemaValidator_patch.txt
          1 kB
          Arthur De Magalhaes

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: