Hi Arpitha,
How about something like this?
xquery version "1.0-ml";
declare function local:wrap-children($Record, $Records) {
let $match-pattern := concat('^', $Record/sort, '\.[^.]+$')
return
element {name($Record)} {
$Record/@*,
$Record/node(),
for $child in
Your input isn't well-formed (spurious ), it's not indented
to make it readable (if it was you would have spotted the mistake),
you haven't given any clues as to how it should be sorted other than
providing output that doesn't correspond to the input, and you haven't
posted any existing code to sho
Hi All,
I am learning XPath and Xquery, i am trying to implement the following query.
But i need some inputs to get proper solution.
here you go with sample XML :
0.0.a
0.0.a.a
0.0.a.b
0.0.a.c
0.0.b
0.0.b.a
0.0.b.a.b
0.0.b.a.b.c
0.0.b.b
0.0.b.c
I want the r