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

Cyclic import doesn't correctly handle type restrictions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 2.2.0
    • 2.3.0
    • None
    • Operating System: Windows XP
      Platform: PC
    • 18341

    Description

      Running "saxcount -n -f -s one.xml" will report this error:

      Error at file two.xsd, line 13, char 54
      Message: Unknown base type one:BookTitle for type S0.

      One.xml points to one.xsd that in turn imports two.xsd that imports one.xsd.
      one:BookTitle is defined in one.xsd, and two.xsd uses it in a derivation by
      restriction. It looks to me that the code that is supposed to pick up the
      right DOM tree is not switching to the correct schema, so the base type is not
      found.

      I have attached the named files, and a patch that seems to be doing the right
      thing.

      Alberto

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--one.xml
          0.2 kB
          Alberto Massari
        2. ASF.LICENSE.NOT.GRANTED--one.xsd
          0.7 kB
          Alberto Massari
        3. ASF.LICENSE.NOT.GRANTED--patch.txt
          2 kB
          Alberto Massari
        4. ASF.LICENSE.NOT.GRANTED--two.xsd
          0.9 kB
          Alberto Massari

        Activity

          People

            Unassigned Unassigned
            alby@exceloncorp.com Alberto Massari
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: