Hi Priyanka,

There are many function to get URI's like cts:uris(),fn:document-uri() and 
others.

Please find below useful links :

https://docs.marklogic.com/6.0/cts:uris

https://docs.marklogic.com/6.0/fn:document-uri

Regards,
Asit Nautiyal
https://docs.marklogic.com/6.0/fn:document-uri
From: [email protected] 
[mailto:[email protected]] On Behalf Of 
[email protected]
Sent: Monday, February 03, 2014 2:54 PM
To: [email protected]
Subject: Re: [MarkLogic Dev General] module to join two xml files


Dell - Internal Use - Confidential
Hi all,

How to obtain URI path of database?

From: 
[email protected]<mailto:[email protected]>
 [mailto:[email protected]] On Behalf Of David Lee
Sent: Friday, January 31, 2014 6:01 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] module to join two xml files

First you need a module header then try this manually by using xdmp:invoke()
A module header looks like

declare module namespace  mine="/mycompany/mymodule" ;

Put that as the first line and store it in the Modules database (or some other 
database you want to use as modules)

Test that you can invoke this manually using xdmp:invoke()

Then in the Create Scheduled Task page, in the admin  GUI (port 8001)   Groups 
- > Default -> Scheduled Tasks
when you create a scheduled task you set the MOdules database (where this code 
lives) AND the Database (where the default
DATA database lives)

that should do it


From: 
[email protected]<mailto:[email protected]>
 [mailto:[email protected]] On Behalf Of 
[email protected]<mailto:[email protected]>
Sent: Friday, January 31, 2014 7:22 AM
To: [email protected]<mailto:[email protected]>
Subject: [MarkLogic Dev General] module to join two xml files


Dell - Internal Use - Confidential
Hi All,

//Query to join 2 xml files

<books-with-prices>
  {
    for $b in doc()//book,
        $a in doc()//book1
    where $b/title = $a/title
    return
        <book-with-prices>
            { $b/title }
            <price-bstore2>{ $a/price/text() }</price-bstore2>
            <price-bstore1>{ $b/price/text() }</price-bstore1>
<year-bstore1>{ $b/year/text() }</year-bstore1>
<date-bstore1>{ $b/date/text() }</date-bstore1>
        </book-with-prices>
  }
</books-with-prices>

I have executed this query successfully on Query Console. The requirement is to 
write a MODULE for the same query so that it can be used for scheduling. How to 
specify URI root(database) while scheduling the task?

[cid:[email protected]]

Priyanka L
Senior Engineer - BIG DATA
Business Innovation Services - BIDW
Dell Services
Email:[email protected]| Mobile:+91 9945785355



This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information. 
If you are not the intended recipient(s), please reply to the sender and 
destroy all copies of the original message. Any unauthorized review, use, 
disclosure, dissemination, forwarding, printing or copying of this email, 
and/or any action taken in reliance on the contents of this e-mail is strictly 
prohibited and may be unlawful.

<<inline: image001.jpg>>

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

Reply via email to