Hi, I have tried to follow the version restore example
on http://developer.marklogic.com/pubs/4.1/apidocs/dls.html#dls:document-ver
sion, and it doesn¹t seam to be working for me.
dls:document-update(
"/foo/bar/baz.xml",
dls:document-version( "/foo/bar/baz.xml", 1),
"restoring from version 1",
fn:true() )
(: Restores version 1 of the 'baz.xml' document. :)
The @xml:base attribute from document being restored seams to be
conflicting the new version update. See stack trace below.
I have since written a utility function which strips the @xml:base
attribute from the document returned by dls:document-version(), before
passing it to
dls:document-update().
[1.0-ml] XDMP-DUPATTR: (err:XQDY0025) $child -- Two attributes with the
same name
Stack trace:
in /MarkLogic/dls.xqy line 1202:
add-xml-base(fn:doc("/vc/library/google.addresses.gpx_xml_versions/2-google.
addresses.gpx.xml")/*:gpx, "/vc/library/google.addresses.gpx.xml")
$node :=
fn:doc("/vc/library/google.addresses.gpx_xml_versions/2-google.addresses.gpx
.xml")/*:gpx
$uri := "/vc/library/google.addresses.gpx.xml"
$child
:= fn:doc("/vc/library/google.addresses.gpx_xml_versions/2-google.addresses.
gpx.xml")/*:gpx/@xml:base
...
Thanks
Miguel
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general