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

XMLpatterns sometimes produce incorrect result, when variable calculated in Let clause is used later in calculation in Return or Let clause

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 4.7.3, 5.5.0
    • Fix Version/s: None
    • Component/s: XML: QtXmlPatterns
    • Labels:
      None
    • Environment:
      win 7

      Description

      I noticed, that sometimes XMLpatterns produce incorrect result, when variable calculated in Let clause is used later in calculation in Return or Let clause. It is quite difficult to understand when this error arises, but in attachment there is a simple query, which surely generates such an error.
      The query extracts centers of parcels whose coordinates stored in xml-file.

      Using this return statement (see Query_1.xq)
      return concat($i/@CadastralNumber, $dlm, $par_x_cen, $dlm, $par_y_cen, $nln)
      produce correct result, but if we add a small modification like that
      return concat($i/@CadastralNumber, $dlm, $par_x_cen, $dlm, $par_y_cen, $dlm, $par_x_cen + 1.0, $dlm, $par_y_cen + 1.0, $nln)
      then result is incorrect - for each parcel is returned the same value, which is true only for the first one.
      But if we place last return statement in the function (see Query_2.xq), then everything works OK again.
      By the way both attached queries force XMLpatterns to crash when using Qt 4.7.4 for msvc2008!?

        Attachments

          Issue Links

          For Gerrit Dashboard: QTBUG-23439
          # Subject Branch Project Status CR V

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                andrey.yasevich Andrey Yasevich
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Gerrit Reviews

                  There is 1 open Gerrit change