Re: [MarkLogic Dev General] query for search in elements and attributes

2011-05-05 Thread Kelly Stirman
You can evaluate XPath and cts:queries against constructed nodes with cts:contains. let $docs := for $i in (1 to 100) return document { element foo {$i}} return $docs[cts:contains(foo,"1")] I can't imagine a case where saving to the database would speed this up. Kelly Message: 2 Date: Thu, 5 M

Re: [MarkLogic Dev General] Reg: Advanced search

2011-05-05 Thread Abhishek53 S
Ambika I am not much clear about your requirement. It seems you are not passing the search options to search:parse API. Please let me know the actual requirement with code snippet Regards Abhishek Srivastav Systems Engineer Tata Consultancy Services Cell:- +91-9883389968 Mailto: abhishek5...@

[MarkLogic Dev General] Reg: Advanced search

2011-05-05 Thread ambika arumugam
hi all, I am performing a search on elements as well attributes using search API. I am using constraints to do the element-attribute search. For the xml, English I am using, import module namespace search = "http://marklogic.com/appservices/search"; at "/MarkLogic/appservices/search/search

Re: [MarkLogic Dev General] Try catch in xquery

2011-05-05 Thread Jason Hunter
If there's any background executions happening inside the try block (a cts:element-values call for example, or an xdmp:http-get) they have to be finished before exiting the try block. Because if they error out, the error has to be handled in the catch. Geert's advice is spot-on. Write the app

Re: [MarkLogic Dev General] Book mark information extraction from PDF

2011-05-05 Thread Mary Holstege
On Thu, 05 May 2011 11:34:21 -0700, Abhishek53 S wrote: > Hi All ! > > Can someone please suggest the way to extract out bookmarks information > while PDF to XHTML conversion using CPF in Marklogic. > The default conversion application extracts the bookmarks from the PDF into the file toc.xm

Re: [MarkLogic Dev General] fn:doc returning several copies of the same document

2011-05-05 Thread Michael Blakeley
The current 4.1 release is 4.1-10 (http://developer.marklogic.com/products/marklogic-server/4.1). If upgrading doesn't resolve the problem, I would contact support. -- Mike On 5 May 2011, at 15:26 , Mark Boyd wrote: > I’m using version 4.1-6. The output of the query you specified is > (“/publ

Re: [MarkLogic Dev General] fn:doc returning several copies of the same document

2011-05-05 Thread Mark Boyd
I'm using version 4.1-6. The output of the query you specified is ("/published/jsp/configuration/cpf/cpf-log.xml" is the path to the log file): (fn:doc("/published/jsp/configuration/cpf/cpf-log.xml"), fn:doc("/published/jsp/configuration/cpf/cpf-log.xml"), fn:doc("/published/jsp/configuration

Re: [MarkLogic Dev General] Try catch in xquery

2011-05-05 Thread Geert Josten
Hi Abishek, You were probably triggered by the phrase 'the block must be completely evaluated before the server can move on'. I'm not familiar with the internals of MarkLogic Server, but there is nothing against processing the contents of the try block in parallel threads (provided the code in

Re: [MarkLogic Dev General] fn:doc returning several copies of the same document

2011-05-05 Thread Michael Blakeley
What version of the server are you using? What does this show? xdmp:describe(doc('/path/to/logfile.xml')) -- Mike On 5 May 2011, at 11:58 , Mark Boyd wrote: > I have some code that appends some general log messages to an XML file stored > in the database during CPF processing of another data

[MarkLogic Dev General] fn:doc returning several copies of the same document

2011-05-05 Thread Mark Boyd
I have some code that appends some general log messages to an XML file stored in the database during CPF processing of another database. After CPF has finished, I try to get the document containing the log messages with something like: fn:doc("/path/to/logfile.xml") What I get back is a sequen

[MarkLogic Dev General] Book mark information extraction from PDF

2011-05-05 Thread Abhishek53 S
Hi All ! Can someone please suggest the way to extract out bookmarks information while PDF to XHTML conversion using CPF in Marklogic.Thanks in advance !Abhishek SrivastavSystems EngineerTata Consultancy ServicesCell:- +91-9883389968Mailto: abhishek5...@tcs.comWebsite: http://www.tcs.com___

Re: [MarkLogic Dev General] Try catch in xquery

2011-05-05 Thread Abishek N
Thanks Geert for your response.. I agree with you on those lines., that's the default way we handle exception scenarios in other programming languages. The question around the try catch block is more with respect to the impact on parallel processing and lazy evaluations which is applicable for ML .

Re: [MarkLogic Dev General] Try catch in xquery

2011-05-05 Thread Geert Josten
Hi Abishek, What is meant with 'reduce the use of try/catch' is that you should make sensible use of try/catch and manually throwing exceptions using the error function. Exception handling is (relatively) slow in most languages, so if you have the option to prevent a throw and a catch by simply

[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

[MarkLogic Dev General] #Announce MarkLogic extension module to xmlsh updated

2011-05-05 Thread Lee, David
xmlsh version 1.1.5 has been released and updated on sourceforge http://www.xmlsh.org Included is an update to the marklogic and calabash extension modules. This release is primarily to update to using Saxon 9.3 as well as minor bug fixes and update to the latest calabash xproc library.

Re: [MarkLogic Dev General] Error when installing xqdebug

2011-05-05 Thread Ton Long Hiep
Dear Keith, I think that is right reason and it is better if you state it clearly in the document. I'm using it well now as It's only the tool to debug for me at the moment. Long Hiep. On Thu, May 5, 2011 at 5:08 PM, Keith L. Breinholt < breinhol...@ldschurch.org> wrote: > I need to correct my

Re: [MarkLogic Dev General] Can someone tell me exactly what the XDMP-DOCCOMMENTCHAR error means?

2011-05-05 Thread Tim Meagher
Thank you all! Tim ___ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general

Re: [MarkLogic Dev General] Error when installing xqdebug

2011-05-05 Thread Keith L. Breinholt
I need to correct myself. The install does copy xqdebug.zip directly to the XQDebug DB so it is curious that any trigger fired. When the XQDebug DB is created it has the default trigger DB which should be [none]. I'll make sure that is explicit in the next release. Let me know if you need an

[MarkLogic Dev General] Field Performance over element

2011-05-05 Thread Abhishek53 S
Hi All Element word constraint is slightly poor in performance than FIELD over the same element (if word indexing is enabled to the FIELD) .Is it justified ? Thanks in advance ! Abhishek Srivastav Assistant Systems Engineer Tata Consultancy Services Plot B-1, Block EP & GP, Sector 5 Salt Lak

Re: [MarkLogic Dev General] Error when installing xqdebug

2011-05-05 Thread Keith L. Breinholt
Looking at the error message I believe the trigger fired because XQDebug install copies the zip file into the Documents database and from there it unzips and copies the files to the XQDebug DB. Looks like I need to change that to copy the file to the XQDebug DB directly. Glad you are up and run

Re: [MarkLogic Dev General] Can someone tell me exactly what the XDMP-DOCCOMMENTCHAR error means?

2011-05-05 Thread Mary Holstege
On Wed, 04 May 2011 16:49:20 -0700, Tim Meagher wrote: > The remote server returned an error: (500) Internal Server Error. > MarkLogic > Error: XDMP-DOCCOMMENTCHAR > > Thank you! > > Tim Meagher > It means that there is a malformed XML comment. This is from the XML parser, not the XQuery parse

Re: [MarkLogic Dev General] query for search in elements and attributes

2011-05-05 Thread seme...@hotmail.com
Slightly off-topic question: what about when you are searching in-memory elements? Suppose I contructed 100 xml trees in memory that were each 1K (just for example), I put them in a sequence, and then I to use XPath against the sequences of trees to find all values of a particular attribute. No

Re: [MarkLogic Dev General] query for search in elements and attributes

2011-05-05 Thread Kelly Stirman
MarkLogic indexes attributes, and you can query on them, but there are a few things to keep in mind: 1) attributes are indexed with their parent elements - you can't search across all attributes independent of their parent elements. So, you can't do */@foo and expect it to be resolved out of th

Re: [MarkLogic Dev General] query for search in elements and attributes

2011-05-05 Thread Abhishek53 S
Abhishek Srivastav Assistant Systems Engineer Tata Consultancy Services Plot B-1, Block EP & GP, Sector 5 Salt Lake Electronics Complex, Kolkata - 700 091,West Bengal India Cell:- +91-9883389968 Mailto: abhishek5...@tcs.com Website: http://www.tcs.com E

Re: [MarkLogic Dev General] saerch:parse - to check attribute values

2011-05-05 Thread Abhishek53 S
Ambika The same problem exists when we perform the attribute value operation over FIELD. The idea is either to restructure your XML content and assign the attribute value to the element value or you can go for attribute constraint query but in this scenario it will be constrained search not t

[MarkLogic Dev General] query for search in elements and attributes

2011-05-05 Thread Rojan K K
Hi, i am doing a search operation in which i will be passing input string to the search:parse() API and whose result is applying for search. but i would like make my search query to be performed in attributes values also. for eg: when i give '(test) OR (test2) AND (ID123)' as my serach query(I

Re: [MarkLogic Dev General] Error when installing xqdebug

2011-05-05 Thread Geert Josten
Hi Long, Triggers are stored in a separate database. The default one is called 'Triggers', and is often shared by multiple databases. Just create another database, go to the XQDebug database configuration, and change the triggers database setting into this new database. You might need to reinst

Re: [MarkLogic Dev General] Error when installing xqdebug

2011-05-05 Thread Ton Long Hiep
Dear Keith, I received this error when installing XQDebug. The information of my Marklogic: - Standard edition (Trial) - Version 4.2-3.2 Thank to your hint, I have just found out the reason: because I have installed a trigger which triggers for root directory on Triggers DB. Now, XQDebug is runnin