Hi,
Running the attached program produces the next evaluation.
Evaluating:
- elementSeq: <A ref="var1"><B><X1/></B></A>
- content0: <X1/>
- content2: <X1/>
- elementSeq: <A ref="var1"><B><X2/></B></A>
- content0: <X2/>
- content2: <X1/>
I can't explain the value of the last "- content2: "-trace.
I expect it to be the same value as the last "- content0: "-trace.
What's happening here?
- Rob Stapper
--- Dit e-mailbericht bevat geen virussen en malware omdat avast! Antivirus-bescherming actief is. http://www.avast.com
Hi Rob,
thanks for the example code. Could you possibly reduce it to a shorter snippet that still demonstrates the surprising behavior?
Best, Christian
On Fri, Nov 7, 2014 at 6:00 PM, Rob Stapper r.stapper@lijbrandt.nl wrote:
Hi,
Running the attached program produces the next evaluation.
Evaluating:
elementSeq: <A ref="var1"><B><X1/></B></A>
content0: <X1/>
content2: <X1/>
elementSeq: <A ref="var1"><B><X2/></B></A>
content0: <X2/>
content2: <X1/>
I can’t explain the value of the last “- content2: ”-trace.
I expect it to be the same value as the last “- content0: ”-trace.
What’s happening here?
- Rob Stapper
Dit e-mailbericht bevat geen virussen en malware omdat avast! Antivirus http://www.avast.com/ actief is.
Hi Christan,
I already have reduced the code significantly. I can give it another go.
In the meanwhile please not parameter: “$element.content” in the function: “$go”.
Nowhere in the function is the parameter reassigned another value, yet the value is changed at the “content2”-trace.
- Rob
Van: Christian Grün [mailto:christian.gruen@gmail.com] Verzonden: vrijdag 7 november 2014 18:04 Aan: Rob Stapper CC: BaseX Onderwerp: Re: [basex-talk] unexpected behaviour
Hi Rob,
thanks for the example code. Could you possibly reduce it to a shorter snippet that still demonstrates the surprising behavior?
Best,
Christian
On Fri, Nov 7, 2014 at 6:00 PM, Rob Stapper r.stapper@lijbrandt.nl wrote:
Hi,
Running the attached program produces the next evaluation.
Evaluating:
- elementSeq: <A ref="var1"><B><X1/></B></A>
- content0: <X1/>
- content2: <X1/>
- elementSeq: <A ref="var1"><B><X2/></B></A>
- content0: <X2/>
- content2: <X1/>
I can’t explain the value of the last “- content2: ”-trace.
I expect it to be the same value as the last “- content0: ”-trace.
What’s happening here?
- Rob Stapper
_____
http://www.avast.com/ Afbeelding verwijderd door afzender.
Dit e-mailbericht bevat geen virussen en malware omdat avast! Antivirus http://www.avast.com/ actief is.
--- Dit e-mailbericht bevat geen virussen en malware omdat avast! Antivirus-bescherming actief is. http://www.avast.com
Ok,
I’ve reduced code until I got the correct result.
I send you a version with: “test_with_correct_result.xq”, and a version without: “test_with_wrong_result.xq”, this last reduction.
Hopefully this is clear enough to demonstrate and pinpoint the problem.
Eager to hear from you,
Rob
Van: Christian Grün [mailto:christian.gruen@gmail.com] Verzonden: vrijdag 7 november 2014 18:04 Aan: Rob Stapper CC: BaseX Onderwerp: Re: [basex-talk] unexpected behaviour
Hi Rob,
thanks for the example code. Could you possibly reduce it to a shorter snippet that still demonstrates the surprising behavior?
Best,
Christian
On Fri, Nov 7, 2014 at 6:00 PM, Rob Stapper r.stapper@lijbrandt.nl wrote:
Hi,
Running the attached program produces the next evaluation.
Evaluating:
- elementSeq: <A ref="var1"><B><X1/></B></A>
- content0: <X1/>
- content2: <X1/>
- elementSeq: <A ref="var1"><B><X2/></B></A>
- content0: <X2/>
- content2: <X1/>
I can’t explain the value of the last “- content2: ”-trace.
I expect it to be the same value as the last “- content0: ”-trace.
What’s happening here?
- Rob Stapper
_____
http://www.avast.com/ Afbeelding verwijderd door afzender.
Dit e-mailbericht bevat geen virussen en malware omdat avast! Antivirus http://www.avast.com/ actief is.
--- Dit e-mailbericht bevat geen virussen en malware omdat avast! Antivirus-bescherming actief is. http://www.avast.com
Or another reduction that results in the expected result.
- Rob
Van: Christian Grün [mailto:christian.gruen@gmail.com] Verzonden: vrijdag 7 november 2014 18:04 Aan: Rob Stapper CC: BaseX Onderwerp: Re: [basex-talk] unexpected behaviour
Hi Rob,
thanks for the example code. Could you possibly reduce it to a shorter snippet that still demonstrates the surprising behavior?
Best,
Christian
On Fri, Nov 7, 2014 at 6:00 PM, Rob Stapper r.stapper@lijbrandt.nl wrote:
Hi,
Running the attached program produces the next evaluation.
Evaluating:
- elementSeq: <A ref="var1"><B><X1/></B></A>
- content0: <X1/>
- content2: <X1/>
- elementSeq: <A ref="var1"><B><X2/></B></A>
- content0: <X2/>
- content2: <X1/>
I can’t explain the value of the last “- content2: ”-trace.
I expect it to be the same value as the last “- content0: ”-trace.
What’s happening here?
- Rob Stapper
_____
http://www.avast.com/ Afbeelding verwijderd door afzender.
Dit e-mailbericht bevat geen virussen en malware omdat avast! Antivirus http://www.avast.com/ actief is.
--- Dit e-mailbericht bevat geen virussen en malware omdat avast! Antivirus-bescherming actief is. http://www.avast.com
Sorry about the previous mail. That reduced version also produces the wrong outcome. A renamed version is attached.
- Rob
Van: Rob Stapper [mailto:r.stapper@lijbrandt.nl] Verzonden: zaterdag 8 november 2014 9:54 Aan: 'Christian Grün' CC: 'BaseX' Onderwerp: RE: [basex-talk] unexpected behaviour
Or another reduction that results in the expected result.
- Rob
Van: Christian Grün [mailto:christian.gruen@gmail.com] Verzonden: vrijdag 7 november 2014 18:04 Aan: Rob Stapper CC: BaseX Onderwerp: Re: [basex-talk] unexpected behaviour
Hi Rob,
thanks for the example code. Could you possibly reduce it to a shorter snippet that still demonstrates the surprising behavior?
Best,
Christian
On Fri, Nov 7, 2014 at 6:00 PM, Rob Stapper r.stapper@lijbrandt.nl wrote:
Hi,
Running the attached program produces the next evaluation.
Evaluating:
- elementSeq: <A ref="var1"><B><X1/></B></A>
- content0: <X1/>
- content2: <X1/>
- elementSeq: <A ref="var1"><B><X2/></B></A>
- content0: <X2/>
- content2: <X1/>
I can’t explain the value of the last “- content2: ”-trace.
I expect it to be the same value as the last “- content0: ”-trace.
What’s happening here?
- Rob Stapper
_____
http://www.avast.com/ Afbeelding verwijderd door afzender.
Dit e-mailbericht bevat geen virussen en malware omdat avast! Antivirus http://www.avast.com/ actief is.
--- Dit e-mailbericht bevat geen virussen en malware omdat avast! Antivirus-bescherming actief is. http://www.avast.com
Hi Christian,
Attached the most reduced version with wrong result.
Success ;-)
Rob
Van: Christian Grün [mailto:christian.gruen@gmail.com] Verzonden: vrijdag 7 november 2014 18:04 Aan: Rob Stapper CC: BaseX Onderwerp: Re: [basex-talk] unexpected behaviour
Hi Rob,
thanks for the example code. Could you possibly reduce it to a shorter snippet that still demonstrates the surprising behavior?
Best,
Christian
On Fri, Nov 7, 2014 at 6:00 PM, Rob Stapper r.stapper@lijbrandt.nl wrote:
Hi,
Running the attached program produces the next evaluation.
Evaluating:
- elementSeq: <A ref="var1"><B><X1/></B></A>
- content0: <X1/>
- content2: <X1/>
- elementSeq: <A ref="var1"><B><X2/></B></A>
- content0: <X2/>
- content2: <X1/>
I can’t explain the value of the last “- content2: ”-trace.
I expect it to be the same value as the last “- content0: ”-trace.
What’s happening here?
- Rob Stapper
_____
http://www.avast.com/ Afbeelding verwijderd door afzender.
Dit e-mailbericht bevat geen virussen en malware omdat avast! Antivirus http://www.avast.com/ actief is.
--- Dit e-mailbericht bevat geen virussen en malware omdat avast! Antivirus-bescherming actief is. http://www.avast.com
Here's another one:
for $n in (<a/>, <b/>) let $f := function() as element()* { trace($n) } return $f()
It seems as if the combination of trace() and the wildcard in the function return type causes this bug. I have just another GitHub issue [1].
Thanks, Christian
[1] https://github.com/BaseXdb/basex/issues/1023
On Sat, Nov 8, 2014 at 10:49 AM, Rob Stapper r.stapper@lijbrandt.nl wrote:
Hi Christian,
Attached the most reduced version with wrong result.
Success ;-)
Rob
*Van:* Christian Grün [mailto:christian.gruen@gmail.com] *Verzonden:* vrijdag 7 november 2014 18:04 *Aan:* Rob Stapper *CC:* BaseX *Onderwerp:* Re: [basex-talk] unexpected behaviour
Hi Rob,
thanks for the example code. Could you possibly reduce it to a shorter snippet that still demonstrates the surprising behavior?
Best,
Christian
On Fri, Nov 7, 2014 at 6:00 PM, Rob Stapper r.stapper@lijbrandt.nl wrote:
Hi,
Running the attached program produces the next evaluation.
Evaluating:
elementSeq: <A ref="var1"><B><X1/></B></A>
content0: <X1/>
content2: <X1/>
elementSeq: <A ref="var1"><B><X2/></B></A>
content0: <X2/>
content2: <X1/>
I can’t explain the value of the last “- content2: ”-trace.
I expect it to be the same value as the last “- content0: ”-trace.
What’s happening here?
- Rob Stapper
[image: Afbeelding verwijderd door afzender.] http://www.avast.com/
Dit e-mailbericht bevat geen virussen en malware omdat avast! Antivirus http://www.avast.com/ actief is.
Dit e-mailbericht bevat geen virussen en malware omdat avast! Antivirus http://www.avast.com/ actief is.
basex-talk@mailman.uni-konstanz.de