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

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: P2: Important P2: Important
    • None
    • 4.7.3, 5.5.0
    • XML: QtXmlPatterns
    • None
    • win 7

      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!?

        1. test.zip
          8 kB
          Andrey Yasevich
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Unassigned Unassigned
            andrey.yasevich Andrey Yasevich
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes