On 3 Nov 2008, at 18:46, Alan Storm wrote:
I’m running into a strange problem with Mark Logic Server 3.2, and
was hoping someone on the list has seen something similar and could
help diagnose. It seems like there’s two documents in the database
with the same URI.
If I run
doc(‘/fake/path/to/file/2008-10-32.xml’)
I get back a result, but get a warning about multiple nodes being
returned. Stranger still, if I run
fn:count(doc(‘/fake/path/to/file/2008-10-32.xml’))
I get back “2” as a result.
Could it be that the document has two nodes at the root level? I've
seen this before when I loaded in a UTF-8 file with a BOM at the
beginning. The way that I solved that was something like this:
for $node in doc('/fake/path/to/file/2008-10-32.xml')
return <node name="{fn:name($node)}" type="{fn:node-kind($node)}" />
I also used fn:string-to-codepoints() to figure out it was a BOM.
I recall from reading the release notes (§4.2.8) that MarkLogic 4 no
longer allows multiple root nodes. I haven't tried ML4 yet though.
-Dom
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general