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

Validation makes a document invalid by specify invalid form for an optional and fixed attribute

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Resolution: Won't Fix
    • 2.1.0
    • None
    • Other
    • None
    • Operating System: Windows NT/2K
      Platform: PC
    • 12557

    Description

      The xlinks.xsd schema of GML has an attribute group as follows (the default
      attribute form is unqualified - note the explicit attribute form on the first
      attribute in the group):

      <xsd:attributeGroup name="simpleLink">
      <xsd:attribute name="type" type="xsd:string" use="optional"
      fixed="simple" form="qualified"/>
      <xsd:attribute ref="xlink:href" use="optional"/>
      <xsd:attribute ref="xlink:role" use="optional"/>
      <xsd:attribute ref="xlink:arcrole" use="optional"/>
      <xsd:attribute ref="xlink:title" use="optional"/>
      <xsd:attribute ref="xlink:show" use="optional"/>
      <xsd:attribute ref="xlink:actuate" use="optional"/>
      </xsd:attributeGroup>

      This attribute group is then referenced from complex type definitions. When an
      instance document without these attributes is validated, Xerces adds the type
      attribute because it is fixed to the value "simple". This is the desired
      behaviour. However, Xerces fails to qualify the attribute by specifying its
      namespace and prefix. Hence, the added type attribute breaks the validity of
      the instance document. This looks like a critical bug to me because a valid
      instance document is made invalid when Xerces validates it. If required, I can
      supply the exact schemas and instance documents.

      Attachments

        Issue Links

          Activity

            People

              sandygao@ca.ibm.com Sandy Gao
              amilanovic@galdosinc.com Aleksandar Milanovic
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: