bug in string-join function
Sedna is a native full-featured XML database management system.
Brought to you by:
mozinsur,
shcheklein
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
Anonymous
ancestor:: is a recerse xPath axis so I believe the behaviour you describe to be correct.
"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:
returns a/b/c