M
mikharakiri_nospaum
Is hierarchical aggregated total expressible in XQuery? Given
<emp name = ALLEN sal = 2000>
<emp name = SMITH sal = 1500>
</emp>
<emp name = MILLER sal = 1800>
<emp name = ADAMS sal = 1000>
</emp>
</emp>
</emp>
the result is supposed to be
<emp name = ALLEN budget = 4300>
<emp name = SMITH budget = 1500>
</emp>
<emp name = MILLER budget = 2800>
<emp name = ADAMS budget = 1000>
</emp>
</emp>
</emp>
<emp name = ALLEN sal = 2000>
<emp name = SMITH sal = 1500>
</emp>
<emp name = MILLER sal = 1800>
<emp name = ADAMS sal = 1000>
</emp>
</emp>
</emp>
the result is supposed to be
<emp name = ALLEN budget = 4300>
<emp name = SMITH budget = 1500>
</emp>
<emp name = MILLER budget = 2800>
<emp name = ADAMS budget = 1000>
</emp>
</emp>
</emp>