Hello,
I'm trying to insert multiple nodes into a document, the nodes are getting
inserted ok but the order is jumbled up.
I'm guessing this is something to do with how transactions are committed
after the script has finished.
Is there an easy way round this or a way of building a set of nodes in the
correct order and inserting them in one go to the parent?
Thanks
Dom
Snippet:
for $k in (
for $kk in $keys
return
$tax2//a[@id=$kk]
)
order by xs:integer($k/@index) descending
return
(
concat(' - ACTUAL=', $k/@name, ' - ', $k/@id, ' - ',
$k/@index, ' '),
xdmp:node-insert-child(
$a/xm:meta,
<xm:field type='subject-link'>
<xa:link link-type='{
concat($a/@type, "-taxonomy-subject-law") }' dest-id='{ $k/@id }' />
</xm:field>
)
)
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general