Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-1524

Xerces fails to validate a valid XML document when the schema contains "forward references" to element-types in certain circumstances.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.7.0
    • 2.8.0
    • None
    • msvc6 / win2k

    Description

      When running "sax2print BugValidationSchema.xml" (xml file attached), I get the following error:
      Message: Attribute 'attr2' is not declared for element 'Level4'

      The schema (also attached) simply contains 4 element/element-types declarations
      ('Level1', 'Level2', 'Level3' and 'Level4', forming an extension chain).
      Attribute 'attr2' is declared within 'Level2', and so should be legal within Level4 too.
      'Level2' also contains a sub-element declaration of type 'Level4'.
      It turns out that commenting out that sub-element declaration renders the xml file valid.

      Attachments

        1. BugValidationSchema.xml
          0.2 kB
          Alain Le Guennec
        2. BugValidationSchema.xsd
          1 kB
          Alain Le Guennec

        Activity

          People

            Unassigned Unassigned
            aleguenn@free.fr Alain Le Guennec
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: