Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-6485

XmlSchema Validation does not terminate

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.7.0
    • 4.6.0
    • XML: QtXmlPatterns
    • None
    • b00cd9859d8b666b851953ee3b37def0ab078a54

    Description

      Hello,
      there appears to be some problem with the XmlSchema (or XmlSchemaValidator) class. If I load a valid XSD file with the XmlSchema class, the algorithm won't terminate. The code is the following:

      int main(int argc, char **argv)
      if (argc < 2)
      return 1;

      QApplication *app = new QApplication(argc, argv);

      QFile file (argv[1]);
      if (!file.open(QIODevice::ReadOnly))
      return 1;

      QXmlSchema schema;
      schema.load (&file);

      return !schema.isValid();

      The program never reaches the end of the main procedure. Using gdb, I found that the application is somewhere stuck in between the validation:

      (gdb) bt
      #0 0x0000000000c8e0f8 in QPatternist::XsdStateMachine<QExplicitlySharedDataPointer<QPatternist::XsdTerm> >::epsilonClosure ()
      #1 0x0000000000c8f754 in QPatternist::XsdStateMachine<QExplicitlySharedDataPointer<QPatternist::XsdTerm> >::toDFA ()
      #2 0x0000000000c86f13 in QPatternist::XsdParticleChecker::isUPAConform ()
      #3 0x0000000000ac7816 in QPatternist::XsdSchemaChecker::checkComplexTypeConstraints ()
      #4 0x0000000000ace809 in QPatternist::XsdSchemaChecker::check ()
      #5 0x0000000000a97d00 in QXmlSchemaPrivate::load ()
      #6 0x0000000000a95396 in QXmlSchema::load ()
      #7 0x000000000044ac20 in main (argc=2, argv=0x7fff31356bc8)

      The input XSD was the following: http://www.absint.com/dtd/a3-apx-9.08i.xsd

      Is there anything I am missing?

      Attachments

        1. xmlvalidation.zip
          1 kB
        2. lmx.xsd
          16 kB

        Activity

          People

            phartman Peter Hartmann (closed Nokia identity) (Inactive)
            gebhard Gernot Gebhard
            Votes:
            3 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: