Hi Ryan, I'd say, contact [email protected]<mailto:[email protected]>. They can file it as a bug for you.
It should also be available in the marklogic/commons on github I think. You could fork, patch and do a pull request. I could do that too for you. For a one-line-fix that shouldn't be much trouble.. ;-) Kind regards, Geert Van: [email protected] [mailto:[email protected]] Namens [email protected] Verzonden: vrijdag 15 april 2011 0:24 Aan: [email protected] Onderwerp: [MarkLogic Dev General] Bug in in-mem-update The following code throws this error: [1.0] XDMP-ATTRSEQ: (err:XQTY0024) $node/@* -- Attribute node cannot follow non-attribute node in element content: xquery version '1.0-ml'; import module namespace mem = "http://xqdev.com/in-mem-update" at "/MarkLogic/appservices/utils/in-mem-update.xqy"; let $test := <root type="a"> <message>Hello</message> </root> return mem:node-insert-child($test, <name>bob</name>) Because the node "root" has an attribute and child elements already, so when adding another child node, the attribute node is not added first. It looks like line 121 in in-mem-update.xqy has a bug where it has: then element { QName(namespace-uri($node), local-name($node)) } { ( $node/node(), $node/@*, $newNode ) } where I think it should be: then element { QName(namespace-uri($node), local-name($node)) } { ( $node/@*, $node/node(), $newNode ) } Can someone confirm? Works for me if I make the above change. Also, I don't know an easy fix for this given that this is code included with MarkLogic. I don't really want to have to remember to change this code on all ML instances. I think the only other option at this point is to make a corrected copy of the code and use that instead. Suggestions? Thanks, Ryan
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
