Hi all,
This is a follow on from a previous thread. I've now constructed a test
case which allows to get to the route of the problem, regarding an error
on a new marklogic instance (2.4-8) that doesn't appear on an existing
instance (2.4-2). The error is:
/[1.0-ml] XDMP-NONAMESPACEBIND: (err:FONS0004) local:asis($node) -- No
namespace binding for prefix/
This occurs when using fn:name on the following:
/<item doi="10.1007/s00003-009-0548-4">
<meta:volume xmlns:meta="http://www.springer.com/app/meta"/></item>/
- But only on the new marklogic instance.
The code to replicate this is as follows:
/
xquery version "1.0-ml";
declare function local:asis($node as node()) as node() {
element
{fn:name($node)}
{
$node/attribute::*
}
};
(:~
: Main Query Block
:
:)
let $item := <item doi="10.1007/s00003-009-0548-4">
<meta:volume xmlns:meta="http://www.springer.com/app/meta"/></item>
return
local:asis($item/node())
/
The solution is to add the meta namespace explicitly, like so:
/declare namespace meta = "http://www.example.com/app/meta";/
But why do you only have to do this on the new server instance and not
the old?! Is there somewhere to set up namespaces for use without the
prefix?
Many thanks,
Dean Pullen
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general