#101 bug in string-join function

Sedna_(development)
open
nobody
None
7
2014-08-17
2014-04-27
ruvim
No

string-join function joins a sequence in incorrect order in the some cases when child for each ancestor is selected.

E.g.

let $d  := <a><i>A</i> <b><i>B</i> <c><i>C</i></c> </b> </a>
return $d//c/i/string-join( ancestor::*/i, '/')

returns C/B/A instead of A/B/C
Note that reverse() has no effect in this case.

SEDNA version is 3.6.316 (64bit Release)
System: Windows 6.1.7601 (SP1.0) x64

Discussion

  • Anonymous - 2014-08-05

    ancestor:: is a recerse xPath axis so I believe the behaviour you describe to be correct.

     
  • ruvim

    ruvim - 2014-08-17

    "The fact that a reverse-axis step assigns context positions in reverse document order for the purpose of evaluating predicates does not alter the fact that the final result of the step is always in document order" by XPath 2.0

    Also note that the following query:

    let $d  := <a><i>A</i> <b><i>B</i> <c><i>C</i></c> </b> </a>
    return $d//c/i/string-join( ancestor::*/name(), '/')
    

    returns a/b/c

     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks