[MarkLogic Dev General] search multiple paths
Pradeep Maddireddy
Pradeep.Maddireddy at HTCinc.com
Fri Feb 6 14:23:53 PST 2009
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:dsokolsky at marklogic.com]
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: general-bounces at developer.marklogic.com
[mailto:general-bounces at developer.marklogic.com] On Behalf Of Pradeep
Maddireddy
Sent: Friday, February 06, 2009 12:56 PM
To: general at developer.marklogic.com
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xqzone.marklogic.com/pipermail/general/attachments/20090206/32e7d68b/attachment.html
More information about the General
mailing list