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

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • None
    • 4.7.3, 5.5.0
    • XML: QtXmlPatterns
    • None
    • 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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes