On Thu, Oct 25, 2012 at 4:32 PM, bryan rasmussen rasmussen.bryan@gmail.com wrote:
thanks that was helpful, but the following
for $doc in db:open('DK') let $name := $doc/*/name() return db:add($name, $doc)
where DK is the name of my db.
returns Resource path '' is invalid.
I tried for $doc in db:open('DK') let $name := local-name(doc($doc)) return db:add($name, $doc)
but that gives a FODC0005 error.
Ok I figured out the FODC0005 error, should have realized it, but the other one has me stumped especially considering that
for $doc in db:open('DK') return $doc/*/name() outputs all the names of the document nodes no problem.
Is there some sort of type conversion that needs to be done?
Thanks, Bryan Rasmussen
for $doc in db:open('DK') let $name := $doc/*/name() return db:add($name, $doc)
where DK is the name of my db.
Maybe one of the returned name strings is empty. Could you send me the result of the following query?
for $name in db:open('DK')/*/name() return element name { $name }
Ok, its attached, can't see any issue. Hope you don't mind that I gzipped but there's nearly 300 thousand documents.
anyway doesn't seem like that would be possible? I didn't tell basex to ignore errors when importing documents, surely a document where name() on document node returned an empty string would be malformed.
Thanks, Bryan Rasmussen
On Thu, Oct 25, 2012 at 10:39 PM, Christian Grün christian.gruen@gmail.com wrote:
for $doc in db:open('DK') let $name := $doc/*/name() return db:add($name, $doc)
where DK is the name of my db.
Maybe one of the returned name strings is empty. Could you send me the result of the following query?
for $name in db:open('DK')/*/name() return element name { $name }
Ok, its attached, can't see any issue. Hope you don't mind that I gzipped but there's nearly 300 thousand documents.
Yes, the data looks fine. As you already indicated, only invalid data would cause such errors, so I'm still not sure what causes the problem in your data, sorry.. Maybe someone else has an idea, or maybe you can do some more debugging?
Christian
basex-talk@mailman.uni-konstanz.de