add attribute to element in xquery
544504Jan 12 2007 — edited Jan 16 2007I ran into a bottleneck...
I'm selecting a bunch of nodes, than I'm enumerating them and for each node retrieving attribute value from another element and that operation takes 80% of the time. Element gets selected using index, I don't think I can improve anything else here, but if during selection in xquery I add one new attribute to the element which is attribute of another element, I think it should improve the performance. I just couldn’t find a good way to do so.
I ran into bunch of problems trying to return custom XML from xquery. Is it possible to add a new attribute to the element in xquery?