[MarkLogic Dev General] Documents added via WebDAV have problems
Mark Helmstetter
Mark.Helmstetter at marklogic.com
Fri Sep 17 12:27:13 PDT 2010
Hi Rob,
I think you're getting burned by the namespaces (which is easy enough to do) on those Report elements. Try this:
declare namespace msp = "urn:us:gov:ic:msp:v3.1";
fn:doc('/path/to/my/xml/thefile.xml')/msp:Report
--Mark
From: general-bounces at developer.marklogic.com [mailto:general-bounces at developer.marklogic.com] On Behalf Of Whiteneriii, Robert [USA]
Sent: Friday, September 17, 2010 3:15 PM
To: general at developer.marklogic.com
Subject: [MarkLogic Dev General] Documents added via WebDAV have problems
Hello,
I have been trying to research this problem, but am coming up empty. I am working on an application in which we are loading XML with a webDav server (I am not sure how important this is). When accessing a document using fn:doc, I am given a root node, but none of the children nodes are recognized. In cq, I can see the xml text when I run a query like this, fn:doc('/path/to/my/xml/thefile.xml'), but if I do this, fn:doc('/path/to/my/xml/thefile.xml')/Report, I get an empty sequence.
I also have tried quoting and then unquoting the document returned by fn:doc:
let $doc := fn:doc("/data/reports/2007/02/01/1822874.xml")
let $xstr := xdmp:quote($doc)
let $ndoc := xdmp:quote($xstr)
return $ndoc/Report
And I get this error back:
1.0-ml] XDMP-NOTANODE: (err:XPTY0019) $ndoc/Report -- "<Report xsi:schemaLocation="urn:us:gov:ic:msp:v3.1 IC-MSP-R..." is not a node
Is there anything special I need to do with the database or webDav set up to support using Windows Explorer to load documents into the db?
Thank You,
Rob Whitener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20100917/7776fda5/attachment.html
More information about the General
mailing list