It's actually my dev PC Anshu is discussing.

This is what I get when declaring and trying to use a locally defined query:

/com.marklogic.xcc.exceptions.XQueryException: XDMP-NONAMESPACEBIND: (err:FONS0004) local:asis($node) -- No namespace binding for prefix on line 38 expr: local:asis($node),/

i.e. we're using an in-file function thats been declared as local:asis and then trying to use it elsewhere in the same query file.

Is there some requirement difference between the two versions of Marklogic?

(i.e. 4.2-4 to 4.2-8)

Because in 4.2-4 it's working!

I'd be surprised if so, as this is only a point release change. Can you setup a default local namespace elsewhere?

Dean.

On 26/01/2012 14:29, Geert Josten wrote:
Hi Anshu,

I wish I could give you a solution, but from what you tell it should work.
Could you share small piece of code that reproduces the error? There might
be a small chance that the actual problem lies somewhere else.

Kind regards,
Geert

-----Oorspronkelijk bericht-----
Van:[email protected]
[mailto:[email protected]] Namens Anshu Raheja
Verzonden: donderdag 26 januari 2012 12:11
Aan: General MarkLogic Developer Discussion
CC: Dean Pullen
Onderwerp: Re: [MarkLogic Dev General] New server not finding namespaces

Hi Greet,

Is there any way to resolve  the local prefix problem.

Thanks,
Anshu

On 25/01/2012 12:53, Anshu Raheja wrote:
Thanks for the response.

We are using it in the main module and xquery version has been declared
as 'xquery version "1.0-ml";'.

Regards,
Anshu

On 25/01/2012 12:45, Geert Josten wrote:
Hi Anshu,

It is correct that you need to declare namespaces in your XQuery to
address Range indexes that use them. It is because indexes work with
qualified names (QNames), so you need both a namespace (uri or prefix
bound to uri) and a local name to be able to address the right QName
from
you query, and select the appropriate index that way. Adding a
namespace
uri to an index does not automatically make it known within XQuery
code..
About the local namespace prefix. Where are you using it (main module
or
library module), and what is the xquery version that you declared on
top?
1.0-ml?

Kind regards,
Geert

-----Oorspronkelijk bericht-----
Van:[email protected]
[mailto:[email protected]] Namens Anshu Raheja
Verzonden: woensdag 25 januari 2012 13:28
Aan: General MarkLogic Developer Discussion
CC: Dean Pullen
Onderwerp: [MarkLogic Dev General] New server not finding namespaces

Hi all,

New to Marklogic and setting up a new dev server (4.2-8), existing
server
is 4.2-4,  and finding that our current Xquery scripts aren't working
on
the new server setup.

It seems the namespaces setup in the database Element Range Indexes etc
aren't found (we have to add the namespace manually to each Xquery
file),
AND that 'local:' is not recognized, e.g.

com.marklogic.xcc.exceptions.XQueryException: XDMP-NONAMESPACEBIND:
(err:FONS0004) local:asis($node) -- No namespace binding for prefix
on line 38
expr: local:asis($node),
in
local:asis(fn:doc("/content/10.1007/s00464-009-0856-x")/item/*:issn[1])
Can anyone help? Thanks in advance.

Anshu

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general


_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to