Hi Ryan, I fixed this on github just now. Sorry for the delay.
I filed a bug also so engineering can take care of the server's copy. -jh- On Apr 14, 2011, at 3:23 PM, [email protected] wrote: > 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
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
