[MarkLogic Dev General] Code coverage tools

2012-01-04 Thread Abishek N
Hello, Are there any code coverage tools available for Marklogic xquery. We are trying to evaluate the percentage of code covered as part of testing. We have used tools like cobertura, agitar, clover to get the coverage in java modules, is there something similar available to xquery? Are there

Re: [MarkLogic Dev General] Directory delete

2011-11-28 Thread Abishek N
Hello Mike deletion of the directory/document requires additional privileges because of which we have to run the delete command using a different user id. Hence the eval statement. We do not see any Deadlock exceptions on the logs. We have been using the directory delete for few months a

Re: [MarkLogic Dev General] Why is cts:search so much faster than XPath?

2011-05-12 Thread Abishek N
I have encountered situations where Xpath is faster than cts:search.. It depends how the xpath has been constructed.. and how many results would the xpath return. If your Xpath has '//' then that would definitely slow down. On Thu, May 12, 2011 at 11:17 AM, seme...@hotmail.com wrote: > I mean

Re: [MarkLogic Dev General] Try catch in xquery

2011-05-06 Thread Abishek N
ttp://developer.marklogic.com/code/performance-meters) > > Kind regards, > Geert > > *Van:* general-boun...@developer.marklogic.com [mailto: > general-boun...@developer.marklogic.com] *Namens *Abishek N > *Verzonden:* donderdag 5 mei 2011 20:34 > *Aan:* General MarkLogic Developer Discussion

Re: [MarkLogic Dev General] best way to find the difference between two list of xml nodes

2011-05-06 Thread Abishek N
Hello Jaun, there are multiple ways this could be done.. the simplest way could be by taking md5s.. you can try this.. let $old := let $new := let $consolidatedMap := map:map() let $oldmap := map:map() let $newmap := map:map() let $eqmap := map:map() let $nothing := for $eachnode

Re: [MarkLogic Dev General] Try catch in xquery

2011-05-05 Thread Abishek N
t; > Personally, I don’t bother about try/catch performance too much. Just use > them sensibly.. > > > > Kind regards, > > Geert > > > > *Van:* general-boun...@developer.marklogic.com [mailto: > general-boun...@developer.marklogic.com] *Namens *Abishek N > *Ve

[MarkLogic Dev General] Try catch in xquery

2011-05-05 Thread Abishek N
What are the pointers while exception handling in ml? One of the pointers we have already heard is "Reduce the use of try/catch where applicable. This is especially true in situations where try/catch blocks may be nested. Try/catch blocks have a negative impact on performance due to the fact that

Re: [MarkLogic Dev General] XDMP-EXTIME: Time limit exceeded

2011-05-04 Thread Abishek N
I have encountered a similar problem while loading a huge document from one Db to other (ML 4.1 and ML4.2).. Typically there is not exception on the line it is pointing to but the command its executing just before it.. Because its timing out.. check what is the difference between *default time *li

Re: [MarkLogic Dev General] xs:string to xpath

2011-03-16 Thread Abishek N
Geert, I realize that I could use xdmp:unpath to convert a string to xpath. xdmp:unpath could help you accomplish Dynamic Xpaths. Thanks for your help! Regards, Abishek On Fri, Feb 18, 2011 at 1:28 PM, Abishek N wrote: > Thanks Kelly for your response, > We have fragment roots conf

Re: [MarkLogic Dev General] Hierarchical Maps and initialization

2011-03-09 Thread Abishek N
t; > *Van:* general-boun...@developer.marklogic.com [mailto: > general-boun...@developer.marklogic.com] *Namens *Abishek N > *Verzonden:* dinsdag 8 maart 2011 22:14 > *Aan:* general@developer.marklogic.com > *Onderwerp:* [MarkLogic Dev General] Hierarchical Maps and initialization >

[MarkLogic Dev General] Hierarchical Maps and initialization

2011-03-08 Thread Abishek N
Hello All, I went through quite a few threads in mark mail to learn about how large an hierarchical structure can map:map accommodate. An eg. is this thread where Jason talks about having a Million document loaded into a hierarchical map in the memory, assuming that this is just a stati

[MarkLogic Dev General] Renaming an XML doc

2011-02-25 Thread Abishek N
Hello all, Can we rename or move an XML document ? As in if a document abc.xml is located at following path /root/abc.xml. can we rename it to /root/xyz.xml ? or can we move it to /users/abc.xml ? what about rename and move at the same time.. to /users/xyz.xml? without having to delete t

Re: [MarkLogic Dev General] xs:string to xpath

2011-02-18 Thread Abishek N
Thanks Kelly for your response, We have fragment roots configured on these documents since each document can have large number ( about few 100,000's ) of such nodes.. That is the reason why i am using cts:search to search within a document. I shall try using the query below as well.. and see

Re: [MarkLogic Dev General] xs:string to xpath

2011-02-18 Thread Abishek N
$fragment := "//ns:address" let $expression := fn:concat('cts:search(', $fragment, ',cts:and-query((cts:document-query("doc.xml")', ',cts:element-range-query(xs:QName("ns:name")', ',"="', ',"John Doe")))&

Re: [MarkLogic Dev General] xs:string to xpath

2011-02-18 Thread Abishek N
"=","John Doe"),'unfiltered') as said above i get the same exception On Thu, Feb 17, 2011 at 6:55 PM, Abishek N wrote: > Apologies Missed out the actual question.. > Is there a better way than the third approach that I had given? > I similar to unquote

Re: [MarkLogic Dev General] xs:string to xpath

2011-02-17 Thread Abishek N
Apologies Missed out the actual question.. Is there a better way than the third approach that I had given? I similar to unquote I have also tried fn:QName but no luck Hello I know this sounds quite simple, but I have not been able to accomplish this. Let me consider the following eg. I am trying

[MarkLogic Dev General] Fwd: xs:string to xpath

2011-02-17 Thread Abishek N
Hello I know this sounds quite simple, but I have not been able to accomplish this. Let me consider the following eg. I am trying to run a search on a single document on the fragament root //ns:address xquery version "1.0-ml"; declare namespace ns = "http://www.addware.com/xmlschemas/report/1";;