Hi Danny,

 

The query was running with version 1.0 after I included the namespace
the problem got resolved.

 

But when I retrieve the content using xdmp:document-get and create a
document in marklogic looks like the function xdp:document-get is
stripping of the following line in the xml file

 

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd";>

 

How can I fix this. 

 

This is the function I am using.

 

define function   load-document($document_uri   as xs:string, $metadata
as node()

{

let $document_name := "abc.xml"

return

xdmp:document-load($document_uri,<options
xmlns="xdmp:document-load"><uri>{$document_name}</uri></options>),

xdmp:document-insert($document_name,<wrapper>{$metadata}<original-conten
t>{fn:doc($document_name)/node()}</original-content></wrapper>)

 

}

 

 

-----Original Message-----
From: Danny Sokolsky [mailto:[email protected]] 
Sent: Friday, February 06, 2009 4:38 PM
To: Pradeep Maddireddy; General Mark Logic Developer Discussion
Subject: RE: [MarkLogic Dev General] search multiple paths

 

Hi Pradeep,

 

What is the query that is causing this exception?  My guess is that the

query is running with:

 

xquery version "1.0";

 

and the xdmp namespace prefix is not automatically bound.  If so, you

either need to bind it with something like this in your prolog:

 

declare namespace xdmp="http://marklogic.com/xdmp"; ;

 

or use 1.0-ml in the XQuery version declaration (which binds it

automatically).

 

-Danny

 

From: [email protected]

[mailto:[email protected]] On Behalf Of Pradeep

Maddireddy

Sent: Friday, February 06, 2009 12:56 PM

To: [email protected]

Subject: [MarkLogic Dev General] search multiple paths

 

Hi..!

 

When I try to execute a query stored in the file system using CQ I

receive the following error

 

"Prefix xdmp has no namespace binding " can someone help me.

 

Thanks in advance.

 

Regards,

Pradeep Maddireddy

 

 

 

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

Reply via email to