[MarkLogic Dev General] Date range constraint a la MarkMail

2011-08-10 Thread Geert Josten
Hi, I'd like to use the search library to support easy entry of date range search terms, like date:201101-201108 (as in MarkMail). How should my 'date' constraint look like? Any examples online? Kind regards, Geert ___ General mailing list

Re: [MarkLogic Dev General] Extend and override

2011-08-10 Thread Geert Josten
Hi Tim, I can think of some ways to do it, but it won't be real overriding, interfacing nor inheritance. Most importantly: XQuery only allows overloading with different *numbers* of arguments. In OO languages you sometime have to resort to delegation as well, that is always an option. But it

Re: [MarkLogic Dev General] Locking in Marklogic

2011-08-09 Thread Geert Josten
Hi Prasanth, Just to make sure I understand your question correctly: you have one request that reads one profile, and creates/updates another, but a second request that is deleting the first profile? Or are you creates and updates spanning multiple requests? Provided reads and creates/updates

Re: [MarkLogic Dev General] MarkLogic- Stack Overflow Error XDMP:STACKOVERFLOW

2011-08-09 Thread Geert Josten
Hi Sunil, Can you give us a small sample of your code? And did you try taking an XSLT approach to tackle your problem? Kind regards, Geert Van: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] Namens sunil.chenga...@cognizant.com Verzonden: dinsdag 9

Re: [MarkLogic Dev General] get all functions in a namespace or module

2011-08-09 Thread Geert Josten
Hi Joe, Rob, To my knowledge there is no introspection feature in MarkLogic Server (yet?).. There are a few alternatives though. If you are able to parse your XQuery code with a grammar parser, you can retrieve any meta-info you like from that. There is of course the XQdoc parser itself. You

Re: [MarkLogic Dev General] collation sort xslt

2011-08-05 Thread Geert Josten
Hi Paul, Apparently you didn't. ;-) Can you share the relevant parts of your code, and a sample of your test data? Kind regards, Geert -Oorspronkelijk bericht- Van: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] Namens Paul M Verzonden:

Re: [MarkLogic Dev General] Marklogic Integration with Tableau

2011-08-01 Thread Geert Josten
Hi Abhishek, Can you tell a bit more about your use cases? I am guessing Tableau will be the user interface, and MarkLogic Server needs to provide data in some format that could be consumed (automatically) by Tableau? Kind regards, Geert Van: general-boun...@developer.marklogic.com

Re: [MarkLogic Dev General] check for a file?

2011-07-30 Thread Geert Josten
() } }; local:file-exists(c:\xxxyy) Kind regards, Geert Van: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] Namens Geert Josten Verzonden: vrijdag 29 juli 2011 21:21 Aan: General MarkLogic Developer Discussion Onderwerp: Re: [MarkLogic Dev General] check for a file? Hi

Re: [MarkLogic Dev General] Facing problem on xml ingestion in MarkLogic server

2011-07-29 Thread Geert Josten
Hi Aswini, MarkLogic Server is usually expecting content to be encoded in UTF-8. I reccon yours isn't. Use setEncodinghttp://developer.marklogic.com/pubs/4.2/javadoc/com/marklogic/xcc/ContentCreateOptions.html#setEncoding(java.lang.String)(String) to tell MarkLogic Server which encoding is

Re: [MarkLogic Dev General] check for a file?

2011-07-29 Thread Geert Josten
Hi Gary, There is no dedicated function, but you can try to read it with xdmp:filesystem-file or xdmp:document-get (with format binary if necessary). If that fails, the file likely doesn't exist. Try this: declare function local:file-exists( $path as xs:string ) as xs:boolean { try {

Re: [MarkLogic Dev General] MarkLogic Event: Today at 6PM In New York City

2011-07-27 Thread Geert Josten
Hi Nuno, Will there be recordings of this meetup? ☺ Kind regards, Geert Van: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] Namens Nuno Job Verzonden: woensdag 27 juli 2011 9:54 Aan: General Mark Logic Developer Discussion Onderwerp: [MarkLogic Dev

Re: [MarkLogic Dev General] MarkLogic Event: Today at 6PM In New York City

2011-07-27 Thread Geert Josten
] MarkLogic Event: Today at 6PM In New York City Not aware of any plans to record. I emailed the organizers so they can get back to me and will let the list know if the event is recorded/streamed. Nuno On Wed, Jul 27, 2011 at 9:57 AM, Geert Josten geert.jos...@daidalos.nlmailto:geert.jos

Re: [MarkLogic Dev General] syntax querstion

2011-07-27 Thread Geert Josten
Hi Gary, Cut-n-paste of your code below into CQ works just fine with me. Could there be some other typo close by in your code? Kind regards, Geert Van: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] Namens Gary Larsen Verzonden: woensdag 27 juli 2011

Re: [MarkLogic Dev General] MarkLogic Event: Today at 6PM In New York City

2011-07-27 Thread Geert Josten
here: http://www.meetup.com/muglondon/events/25830801/ On Jul 27, 2011, at 9:57 AM, Geert Josten wrote: Hi Nuno, Will there be recordings of this meetup? J Kind regards, Geert Van: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] Namens Nuno Job

Re: [MarkLogic Dev General] json html

2011-07-22 Thread Geert Josten
Hi Paul, $s//title/node() is retuning multiple nodes. I guess xdmp:quote is doing a string-join with \n. Try the following instead: let $title2 := string-join($s//title/node()/xdmp:quote(.), '') (untested) Kind regards, Geert -Oorspronkelijk bericht- Van:

Re: [MarkLogic Dev General] ML Deployment automation and testing

2011-07-21 Thread Geert Josten
: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten Sent: Wednesday, July 20, 2011 3:18 PM To: General MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] ML Deployment automation and testing Hi Will, Testing your

Re: [MarkLogic Dev General] ML Deployment automation and testing

2011-07-20 Thread Geert Josten
Hi Will, Testing your script against another instance of MarkLogic Server, as suggested by David, is probably the easiest way of testing it. But it should be possible to create a second Security database. It is essentially just another database, though with rather specific contents. You will

Re: [MarkLogic Dev General] Async behavior of HTTP request

2011-07-18 Thread Geert Josten
Hi David, Well, one of the ML experts (Kelly or Jason perhaps?) remarked that searchable expressions are treated rather differently. They are not evaluated before being passed into functions like cts:search. Instead, they are somehow passed in as-is, and evaluated directly against indexes.

Re: [MarkLogic Dev General] Read only access to non admin user

2011-07-18 Thread Geert Josten
Hi Abhishek, I recommend creating access roles beforehand. You will need about five to do it thoroughly. MarkLogic Server identifies 4 types of permissions: read, update, delete and execute. Create a role for each. Create a fifth that has default permissions set for the other four roles. Use

Re: [MarkLogic Dev General] Async behavior of HTTP request

2011-07-14 Thread Geert Josten
Hi Abhishek, I am guessing that they meant the HTTP app servers with HTTP interfaces, not the xdmp:http functions. Though, there are cases in which statements from one xquery module are processed in parallel. Not sure when though. I think that such xdmp:http calls force the xquery engine to

Re: [MarkLogic Dev General] question about organizing schema

2011-07-13 Thread Geert Josten
Hi Helen, I'd recommend to make a shared schema file (more or less your option 2) that contains complex types for things like address and person. When defining an editor, you simply say that the type of that element is that of the complex type person. That way editor will be in its own

Re: [MarkLogic Dev General] question about organizing schema

2011-07-13 Thread Geert Josten
think usually I would prefer the element phone and all its' children are in the same namespace (like common). Did I miss anything here? Thanks, Helen On Wed, Jul 13, 2011 at 2:56 AM, Geert Josten geert.jos...@daidalos.nl wrote: Hi Helen, I'd recommend to make a shared schema file (more or less

Re: [MarkLogic Dev General] question about organizing schema

2011-07-13 Thread Geert Josten
elements inside phone are in common namespace. This result is not what I want. I think usually I would prefer the element phone and all its' children are in the same namespace (like common). Did I miss anything here? Thanks, Helen On Wed, Jul 13, 2011 at 2:56 AM, Geert Josten geert.jos

Re: [MarkLogic Dev General] IE(8), ML and XSLTForms

2011-07-13 Thread Geert Josten
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten Sent: Wednesday, July 13, 2011 12:56 PM To: General MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] IE(8), ML and XSLTForms Wow, that was nearly a year ago.. :) I could imagine that IE is still using the mime

Re: [MarkLogic Dev General] post xml with html character entity

2011-07-11 Thread Geert Josten
Hi Sai, Can you show the code you use to repost the XML. It sounds like you need to escape your xml somewhere, but showing your code helps us to find out where best.. Kind regards, Geert Van: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] Namens sai

Re: [MarkLogic Dev General] {Spam?} Re: post xml with html character entity

2011-07-11 Thread Geert Josten
data{$inputxml}/data /options ) i do a xdmp:unquote and xdmp:quote before i repost. I get the error even if i don't use xdmp:unquote and xdmp:quote . Thanks, Sai. --- On Mon, 7/11/11, Geert Josten geert.jos...@daidalos.nl wrote: From: Geert Josten geert.jos...@daidalos.nl Subject: Re

Re: [MarkLogic Dev General] {Spam?} Re: post xml with html character entity

2011-07-11 Thread Geert Josten
: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] Namens Geert Josten Verzonden: maandag 11 juli 2011 19:21 Aan: General MarkLogic Developer Discussion Onderwerp: Re: [MarkLogic Dev General] {Spam?} Re: post xml with html character entity Hi Sai, What

Re: [MarkLogic Dev General] Xinclude in XSLT

2011-07-09 Thread Geert Josten
Dear Paul, No I think it shouldn't. The XSLT rec doesn't specify how XIncludes should be handled. In fact, I expect that in Oxygen it is not the transform, but the xml reader before that, that is doing the actual xinclude expansion. So, by calling xinc:node-expand() before passing the document

Re: [MarkLogic Dev General] Forest is getting out of disc space

2011-06-30 Thread Geert Josten
Hi Abhishek, Is it possible to make some more space available? If yes then doing so and starting the merge again should solve your problems. Your data should be safe. But you can always make a copy of it first to some other location. Kind regards, Geert Van:

Re: [MarkLogic Dev General] Renaming a document

2011-06-29 Thread Geert Josten
, copying, distribution, or use of this e-mail communication by others is strictly prohibited. If you are not the intended recipient, please notify us immediately by returning this message to the sender and delete all copies. Thank you for your cooperation. On Jun 29, 2011, at 8:56 AM, Geert

Re: [MarkLogic Dev General] E Node Cluster Question

2011-06-29 Thread Geert Josten
I'd expect 5 E-nodes with a load balancer in front to handle peak loads better, than just two, right? Though size and number of D-nodes is likely to influence that as well. And not sure peaks are expected, and whether there is a need to handle them well.. Kind regards, Geert Van:

Re: [MarkLogic Dev General] Query Parsing

2011-06-28 Thread Geert Josten
Hi Abhishek, One of the features of search:search is that it can parse the search query. That requires string parsing, which usually gets exponentially slower with the length of the string that needs to be parsed. Also, search:search translates to something expressed in cts on the backend. So,

Re: [MarkLogic Dev General] Applying schemas to schema-less documents

2011-06-24 Thread Geert Josten
Hi David, You specify the data-type to be used for an index in the index definition itself. So, if it finds an elem or attr that matches one of the indexes, it tries to cast its value to the one of the index and insert it in the index. No schema involved there. If casting fails, for instance

Re: [MarkLogic Dev General] Upgrading an EC2 instance from 4.1 to 4.2

2011-06-24 Thread Geert Josten
Hi David, I would be surprised if it would have been much different than a regular upgrade. It feels a bit unnerving to have to uninstall it yourself first, but never went wrong on the boxes I used.. Kind regards, Geert Van: general-boun...@developer.marklogic.com

Re: [MarkLogic Dev General] String range index contains duplicate values

2011-06-23 Thread Geert Josten
Developer Discussion CC: Geert Josten Onderwerp: Re: [MarkLogic Dev General] String range index contains duplicate values Hi Greet, Please find the code below: search:search('title:(Reviews of Physiology, Biochemistry)', options xmlns=http://marklogic.com/appservices/search;http

Re: [MarkLogic Dev General] element values in fragments

2011-06-22 Thread Geert Josten
Hi Gary, Are you aware that cts:element-value-match is returning values that match the pattern, not a query that does so? Run it separately. Wouldn't be surprised if it would return an empty sequence, you might want to try '*' instead of '?' as pattern.. Cts:and-query doesn't return doc-id's.

Re: [MarkLogic Dev General] String range index contains duplicate values

2011-06-22 Thread Geert Josten
Hi Anshu, Could you show us the code you are using? Kind regards, Geert Van: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] Namens Anshu Raheja Verzonden: donderdag 23 juni 2011 4:17 Aan: General MarkLogic Developer Discussion CC: Steve Mallen

Re: [MarkLogic Dev General] Viewing Documents with WebDAV

2011-06-20 Thread Geert Josten
Hi David, Guessing a bit here, but sounds like the WEBDAV interface is accessing the actual documents, possibly to retrieve properties and such. It might help to apply fragmentation, which could help MarkLogic Server to load the data piece by piece and keep a smaller memory footprint. But

Re: [MarkLogic Dev General] Calling Javascript from Xquery

2011-06-20 Thread Geert Josten
Hi Randy, XQuery is not designed to mingle with foreign languages. MarkLogic Server does support some support for such interaction, but not with JS. You can invoke XSLT from XQuery, and there are modules that use xdmp:http-get and related to do some background processing in Java (MLJAM), or

Re: [MarkLogic Dev General] Net Working Days calculation?

2011-06-17 Thread Geert Josten
Hi Jason, That was my initial thought as well. Such calculation would scale much better. Here the more scalable approach: import module namespace functx = http://www.functx.com; at /MarkLogic/functx/functx-1.0-nodoc-2007-01.xqy; let $weekdays := (su, mo, tu, we, th, fr, sa) let $holidays :=

Re: [MarkLogic Dev General] Net Working Days calculation?

2011-06-17 Thread Geert Josten
and known-holiday-count-after for every date would allow fastest calcuation, I think. Damon From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] On Behalf Of Geert Josten [geert.jos...@daidalos.nl] Sent: Friday, June 17, 2011 8

Re: [MarkLogic Dev General] Net Working Days calculation?

2011-06-17 Thread Geert Josten
: From: Geert Josten geert.jos...@daidalos.nl Subject: Re: [MarkLogic Dev General] Net Working Days calculation? To: General MarkLogic Developer Discussion general@developer.marklogic.com Message-ID: b26c615f8546a84c81165a7bc8be61a02038cb4...@exmbxc01.ms-hosting.nl Content-Type: text

Re: [MarkLogic Dev General] Node Replace

2011-06-15 Thread Geert Josten
Business Solutions Outsourcing From: Geert Josten geert.jos...@daidalos.nl To: General MarkLogic Developer Discussion general@developer.marklogic.com Date: 06/15/2011 03:47 PM Subject: Re: [MarkLogic Dev General] Node

Re: [MarkLogic Dev General] Marklogic database fields over large text

2011-06-14 Thread Geert Josten
/ Experience certainty.IT Services Business Solutions Outsourcing From: Geert Josten geert.jos...@daidalos.nl To: General MarkLogic Developer Discussion general@developer.marklogic.com

Re: [MarkLogic Dev General] output PDF from MarkLogic?

2011-06-09 Thread Geert Josten
Hi Ryan, You could take a look at MLJAM. It runs as background service and supports FOP (http://developer.marklogic.com/code/mljam). It is not difficult to run it in Jetty or Apache, and limiting access to MLJAM to localhost, or password-protect it if you like.. Kind regards, Geert Van:

Re: [MarkLogic Dev General] output PDF from MarkLogic?

2011-06-09 Thread Geert Josten
Hi, FOP had some gaps in its coverage, but have used it with great success for professional use as well (even the old version 0.20.4). I heard really good things about its latest version.. Kind regards, Geert -Oorspronkelijk bericht- Van: general-boun...@developer.marklogic.com

Re: [MarkLogic Dev General] Element name suggestion.

2011-06-09 Thread Geert Josten
Hi Stephane, This question has passed before. :) Mike once suggested you can save time by not including all docs, but take a sample of a hundred or a thousand of them instead. Not a guarantee you get 100% back, but scales better at least: http://markmail.org/message/eojd6ucr7qnlioji Kind

Re: [MarkLogic Dev General] Deleting large number of documents from large database

2011-06-07 Thread Geert Josten
Hi Allen, I think Damon is overlooking the fact that you are passing in a sequence of uri's to xdmp:document-delete. That function itself actually accepts only a single value argument, but function mapping (a MarkLogic Server specific feature) is implicitly adding a for-loop around it, making

Re: [MarkLogic Dev General] Integrating marklogic with apache

2011-06-06 Thread Geert Josten
Hi Carmen, It is likely that your MarkLogic HTTP Server is configured to use HTTP authentication. In that case, you need to make sure credentials are specified or sent along. Alternative is to change the HTTP server to use application-level authentication. Then no credentials are requested,

Re: [MarkLogic Dev General] String range index contains duplicate values

2011-06-06 Thread Geert Josten
Hi Steve, A bit of a guess here, but are you working as admin? Perhaps the second pair of values is coming from deleted fragments, which are visible to admin in certain cases (if I am correct). You can purge any deleted fragments by doing an explicit merge on the database.. Kind regards,

Re: [MarkLogic Dev General] #Announce MarkLogic extension to xmlsh updated

2011-06-06 Thread Geert Josten
Hi Lanz, I am not an xmlsh expert, but I do notice something that looks like an un-wellformed construct: exportDate{$my-element-value}exportDate); Might be a copy-paste error, but thought to mention it anyhow.. Kind regards, Geert -Oorspronkelijk bericht- Van:

Re: [MarkLogic Dev General] Deleting large number of documents from large database

2011-06-06 Thread Geert Josten
Hi Allen, You could use xdmp:directory-delete('/documents/7615990080550346622/'), but what is killing you here is the CPF triggers. Each document delete is triggering CPF events, which consumes a lot of unnecessary time and resources. You could try to short-cut delete events, or should

Re: [MarkLogic Dev General] Discovering element namespaces

2011-05-29 Thread Geert Josten
Hi Tim, It's usefulness is considered a bit questionable, but XSLT supports the namespace:: axis. You could use //namespace::* to have any declared namespace within the document being returned to you. The name should provide you with the prefix, the value with the uri. It differs from the

Re: [MarkLogic Dev General] REST API

2011-05-26 Thread Geert Josten
...@developer.marklogic.commailto:general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.commailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten Sent: Wednesday, May 25, 2011 4:55 PM To: General MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] REST API Hi

Re: [MarkLogic Dev General] NQLoader and naked properties

2011-05-25 Thread Geert Josten
Hi Mehul, About 1. The connection string given below points to a HTTP app server running on 'host-1' using port '8012'. Use the Admin interface of MarkLogic Server to look it up. The HTTP app server contains a database settings which control against which modules and documents database (, and

Re: [MarkLogic Dev General] NQLoader and naked properties

2011-05-25 Thread Geert Josten
did for $i in doc() return (document-uri($i)) I get nothing. So how do I use xdmp:document-remove-properties(/bla.xml, xs:QName(test)) ? Thanks, Mehul. From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten Sent: Wednesday

Re: [MarkLogic Dev General] NQLoader and naked properties

2011-05-25 Thread Geert Josten
Hi Mehul, cts:uris is a good alternative indeed. Use the properties option to make it return only uris for properties.. Kind regards, Geert -Oorspronkelijk bericht- Van: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] Namens Kelly Stirman

Re: [MarkLogic Dev General] REST API

2011-05-25 Thread Geert Josten
Hi Paul, Part of the solution is using the url rewriter option of http app servers. That and more is explained in the application developer guide. Here a direct link to the HTML section, the guide is also available as PDF:

Re: [MarkLogic Dev General] MarkLogic and Cocoon

2011-05-12 Thread Geert Josten
Hi Gary, There might be code around (someone in my company did some work on Java connectors for MarkLogic Server), but it might be easier to access MarkLogic Server through HTTP. I am doing so at home actually. It allows you to take a more functional approach. Here is an example how someone

Re: [MarkLogic Dev General] MarkLogic and Cocoon

2011-05-12 Thread Geert Josten
curve and can't find any docs on the MarkLogic Rest API. Would you have a link handy? Thanks again, gary From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten Sent: Thursday, May 12, 2011 10:53 AM To: General MarkLogic

Re: [MarkLogic Dev General] How To Get The Content of An Index?

2011-05-11 Thread Geert Josten
Just to add to the excelent example: What you need to make the $song-doc//ts:Value[position() = ($x + 1)] work is ensure the predicate is not applied to document order, but to sequence order. You need to convert the part before the predicate to a sequence, which is very easily done by wrapping

Re: [MarkLogic Dev General] Node selector xpath not working

2011-05-11 Thread Geert Josten
Hi Will, I agree with Justin and the others that default element namespaces can cause quite some confusion. But just to respond to your ' let $config-info := local:get-config-info()': you could also put the let within the function, but outside the XML. Being fond of keeping things like logic

Re: [MarkLogic Dev General] How To Get The Content of An Index?

2011-05-11 Thread Geert Josten
)] Evan Lenz Software Developer, Community MarkLogic Corporation Phone +1 360 297 0087 email evan.l...@marklogic.commailto:evan.l...@marklogic.com webdeveloper.marklogic.comhttp://developer.marklogic.com/ From: Geert Josten geert.jos...@daidalos.nlmailto:geert.jos...@daidalos.nl Reply

Re: [MarkLogic Dev General] How To Get The Content of An Index?

2011-05-10 Thread Geert Josten
Hi Randy, Using index-of might not perform well. I would recommend using the for each at $pos construction instead: for $song at $index in $searchresults ... You can use $searchresults[$index + 1] to get access to the next searchresult (if there is any) Kind regards, Geert Van:

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

2011-05-10 Thread Geert Josten
Hi Dj, Maps can indeed be helpful, but might not perform too well when you try to put a few thousand nodes in there, and increasing. It might be worthwhile to try to rely more on indexes. If you only need to isolate new ID's, and have the old list stored in the database, then you could

Re: [MarkLogic Dev General] Save the PDF Conversion output

2011-05-10 Thread Geert Josten
Hi Abhishek, To my knowledge, xdmp:pdf-convert doesn't support a destination-root option, but simply returns a so-called 'parts' node containing 'filenames', and the document nodes of the actual results there-after. CPF with conversion option though, will process PDF's entering the database

Re: [MarkLogic Dev General] How To Get The Content of An Index?

2011-05-10 Thread Geert Josten
return note: I thought the following line would work but it didn't div class=abc Content of Value at cat + 1 = {$song-doc//ts:Value[$x + 1]}/div else ()} ... any help appreciated!! randy On 5/10/2011 7:05 AM, Geert Josten wrote: Hi Randy, Using index-of might not perform well. I

[MarkLogic Dev General] More easter eggs: HMAC SHA and AWS

2011-05-08 Thread Geert Josten
Hi, Browsing through the MarkLogic built-in Modules in search for some modules I knew must be there, my eye was caught by the EC2 and AWS modules. Scanning through them I noticed the use of the following undocumented functions: - xdmp:aws-url-encode - xdmp:hmac-sha256 Can anyone explain in

Re: [MarkLogic Dev General] slow query/profiler question

2011-05-07 Thread Geert Josten
Hi Jakob, I suspect the predicate. You have xx[/yy], but /yy isn't restricted to descendants of xx. Instead /yy always starts at the root, even in predicates. To be more precise, you could read that as [doc()/yy], and because in MarkLogic Server doc() returns a list of *all* documents, /yy is

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

Re: [MarkLogic Dev General] Try catch in xquery

2011-05-05 Thread Geert Josten
, Geert Josten geert.jos...@daidalos.nlmailto:geert.jos...@daidalos.nl wrote: 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

[MarkLogic Dev General] Validate within element content throws exception

2011-05-04 Thread Geert Josten
Hi, I am running ML 4.2-1 on win7 64-bit. When I run this code it throws an exception. The syntax parser seems to get confused. Is it a known bug? Or perhaps fixed in latest version? xquery version '1.0-ml'; test{ validate { test/ } }/test Exception: [1.0-ml] XDMP-UNEXPECTED: (err:XPST0003)

Re: [MarkLogic Dev General] Validate within element content throws exception

2011-05-04 Thread Geert Josten
Hi Mike, Anything except a syntax error.. ;-) Kind regards, Geert PS: MarkLogic Support has picked it up.. -Oorspronkelijk bericht- Van: Mike Sokolov [mailto:soko...@ifactory.com] Verzonden: woensdag 4 mei 2011 15:04 Aan: General MarkLogic Developer Discussion CC: Geert Josten

Re: [MarkLogic Dev General] serialize query results

2011-05-04 Thread Geert Josten
Hi Gary, The simplest way I know (and perhaps the only): xdmp:save http://developer.marklogic.com/pubs/4.2/apidocs/UpdateBuiltins.html#xdmp:save Kind regards, Geert Van: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] Namens Gary Larsen Verzonden:

Re: [MarkLogic Dev General] OAuth implementations?

2011-05-03 Thread Geert Josten
...@developer.marklogic.com [general-boun...@developer.marklogic.com] On Behalf Of Geert Josten [geert.jos...@daidalos.nl] Sent: Tuesday, May 03, 2011 1:45 AM To: General MarkLogic Developer Discussion (general@developer.marklogic.com) Subject: [MarkLogic Dev General] OAuth implementations? Hi all

Re: [MarkLogic Dev General] Bulk Update

2011-05-02 Thread Geert Josten
Hi Abishek, Spawning a call to a main module that updates a single doc or a batch of documents, as mentioned by Pradeep, is indeed the most straight-forward approach here. You could however also consider using the Content Processing Framework for this purpose. That might be worthwhile if

Re: [MarkLogic Dev General] GET + POST

2011-05-02 Thread Geert Josten
Hi Greg, I am not sure about the format of your POST body. It may well be supported by your third-party API, but I am more used to what is being produced by HTML POST forms. E.g. a body similar to this: numberOfPages=16color=true And the Content-Type set to: application/x-www-form-urlencoded

Re: [MarkLogic Dev General] GET + POST

2011-05-02 Thread Geert Josten
. Thanks, Greg On May 2, 2011, at 9:44 AM, Geert Josten wrote: Hi Greg, I am not sure about the format of your POST body. It may well be supported by your third-party API, but I am more used to what is being produced by HTML POST forms. E.g. a body similar to this: numberOfPages=16color

Re: [MarkLogic Dev General] checking the status of webservice (running or not) using xdmp:http-get

2011-04-28 Thread Geert Josten
Hi Sujan, Pass in a timeout option with a value of zero. The value is, if I am not mistaken, the timeout in seconds. More details can be found in the documentation: http://developer.marklogic.com/pubs/4.2/apidocs/Ext-2.html#xdmp:http-get Kind regards, Geert Van:

Re: [MarkLogic Dev General] Regarding Application builder

2011-04-20 Thread Geert Josten
. After successful authentication directing it to page depending upon the user role. Can you please let me know whether this can happen? On Wed, Apr 20, 2011 at 11:21 AM, Geert Josten geert.jos...@daidalos.nlmailto:geert.jos...@daidalos.nl wrote: Hi Anirudh, You can use the MarkLogic Server Admin

Re: [MarkLogic Dev General] Regarding Application builder

2011-04-20 Thread Geert Josten
: [MarkLogic Dev General] Regarding Application builder The start of the website has an authentication. I thought the page which is generated using application builder can't use it. How can I reuse the credentials? On Wed, Apr 20, 2011 at 9:47 PM, Geert Josten geert.jos...@daidalos.nlmailto:geert.jos

Re: [MarkLogic Dev General] Getting XDBC server root folder name in XQUERY

2011-04-19 Thread Geert Josten
Hi Ramachandran, That shouldn't be much different from how you do it in an http server. Just call: xdmp:modules-root(). It returns the root of the current server. Returning the root of a different server is a bit more tricky.. Kind regards, Geert Van:

Re: [MarkLogic Dev General] Regarding Application builder

2011-04-19 Thread Geert Josten
Hi Anirudh, Can you elaborate what you mean with ‘remote database’? Is it a just a different database within a MarkLogic Server cluster, or an entirely different database, or perhaps something like LDAP? Kind regards, Geert Van: general-boun...@developer.marklogic.com

Re: [MarkLogic Dev General] Regarding Application builder

2011-04-19 Thread Geert Josten
It is a different database(not mark logic). On Tue, Apr 19, 2011 at 11:57 PM, Geert Josten geert.jos...@daidalos.nlmailto:geert.jos...@daidalos.nl wrote: Hi Anirudh, Can you elaborate what you mean with ‘remote database’? Is it a just a different database within a MarkLogic Server cluster

Re: [MarkLogic Dev General] Regarding Application builder

2011-04-19 Thread Geert Josten
, 2011 at 12:28 AM, Geert Josten geert.jos...@daidalos.nlmailto:geert.jos...@daidalos.nl wrote: Hi Anirudh, MarkLogic Server doesn’t have any dedicated back-end connectors for connecting different databases, but it is often not too difficult to disclose them using HTTP, or write a small webapp

Re: [MarkLogic Dev General] Multipart HTTP POST

2011-04-18 Thread Geert Josten
Hi Greg, To my knowledge it shouldn't be necessary to do a lot of encoding. I could be wrong though. I recently sent this message containing code how to send a multipart response: http://markmail.org/message/lnkgviksr5kr2hkf Kind regards, Geert -Oorspronkelijk bericht- Van:

Re: [MarkLogic Dev General] Bug in in-mem-update

2011-04-15 Thread Geert Josten
Hi Ryan, I'd say, contact supp...@marklogic.commailto:supp...@marklogic.com. They can file it as a bug for you. It should also be available in the marklogic/commons on github I think. You could fork, patch and do a pull request. I could do that too for you. For a one-line-fix that shouldn't

Re: [MarkLogic Dev General] PGP\GPG in MarkLogic?

2011-04-15 Thread Geert Josten
Hi Ryan, Instead of PGP/GPG you could also look into XML Digital Signature (http://www.w3.org/Signature/), provided you are signing xml content. I am not aware of XQuery implementations, but there is good support in Java. Note: if you are concerned with internal security (like an sysadmin or

Re: [MarkLogic Dev General] File Browser Button

2011-04-12 Thread Geert Josten
Hi Rams, Don't use xdmp:document-load, but the http upload feature. It sounds like you already have an html form to upload a file, but are ignoring the file data that is already sent along with the request. Use the xdmp:get-request-* functions to access the file contents.. Kind regards, Geert

Re: [MarkLogic Dev General] TRY ... CATCH -- IE Browser Issue

2011-04-12 Thread Geert Josten
Hi Rams, Could you please give a short summary of the actual code you are using? It would also help to know how you setup the HTTP server. Kind regards, Geert Van: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] Namens Sujan Reddy Verzonden: dinsdag 12

Re: [MarkLogic Dev General] TRY ... CATCH -- IE Browser Issue

2011-04-12 Thread Geert Josten
, Apr 12, 2011 at 12:43 PM, Geert Josten geert.jos...@daidalos.nlmailto:geert.jos...@daidalos.nl wrote: Hi Rams, Could you please give a short summary of the actual code you are using? It would also help to know how you setup the HTTP server. Kind regards, Geert Van: general-boun

Re: [MarkLogic Dev General] File Browser Button

2011-04-12 Thread Geert Josten
/options ) }; Thanks rams On Tue, Apr 12, 2011 at 1:56 PM, Geert Josten geert.jos...@daidalos.nlmailto:geert.jos...@daidalos.nl wrote: Hi Rams, I typically use a multipart form. Something like this: form action=myquery.xqy method=POST enctype=multipart/form-data

Re: [MarkLogic Dev General] delete files from marklogic DB which starts with same word

2011-04-12 Thread Geert Josten
Hi Ram, Sounds like you are looking for a pattern match on the uri. I would recommend cts:uri-match for that purpose. Something like this: for $uri in cts:uri-match('*bla*') return xdmp:document-delete($uri) It does require the URI lexicon to be enabled in the database

Re: [MarkLogic Dev General] Ignore inline style tags while search

2011-04-11 Thread Geert Josten
Hi Abhishek, Have you tried configuring these element as 'Phrase-throughs'? You can find that in the database configuration in the Admin console. Kind regards, Geert Van: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] Namens Abhishek53 S Verzonden:

Re: [MarkLogic Dev General] Node replace without changing its content

2011-04-09 Thread Geert Josten
Hi Ambika, There is no element rename function, so you will have to replace the entire element. You can build the new one based on the old one though. Something like this: for $old-element in doc()//name let $new-element := element {'firstname'} { $old-element/node() } return

Re: [MarkLogic Dev General] sending an xml and pdf in a single response

2011-04-07 Thread Geert Josten
Hi Raghu, Yes, you can, but it requires some manual work to compose the multipart response. I happen to have some code to do that. Composing the response can be done like this: let $boundary := soap:_init-multipart-response() return

Re: [MarkLogic Dev General] sending an xml and pdf in a single response

2011-04-07 Thread Geert Josten
Note: not very heavily tested, but it should work. You can ignore the SOAP stuff.. Kind regards, Geert Van: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] Namens Geert Josten Verzonden: donderdag 7 april 2011 9:48 Aan: General MarkLogic Developer

Re: [MarkLogic Dev General] Formatting issue

2011-04-07 Thread Geert Josten
Hi Prasanth, If you want angular brackets to be shown as angular brackets among the character data within HTML, you need to escape them. I think the easiest way of doing this in MarkLogic Server is using xdmp:quote (http://developer.marklogic.com/pubs/4.2/apidocs/Ext-5.html#xdmp:quote). It

Re: [MarkLogic Dev General] Can't delete security collection(s) with same URI

2011-03-11 Thread Geert Josten
Hi Jagannath, You could intervene in the Security database using for instance CQ, but I would be very careful with that. I recommend contacting supp...@marklogic.commailto:supp...@marklogic.com, and ask them to guide you through. They can also file this as a bug.. Kind regards, Geert Van:

Re: [MarkLogic Dev General] query priority

2011-03-10 Thread Geert Josten
Hi Mike, To my knowledge MarkLogic Server doesn't support priorities in request queue nor in task queue. You could apply the approach described by Tim to the request queue, but spawning them to the task server might be better. You could also consider having a separate host (or cluster) to take

<    5   6   7   8   9   10   11   12   13   14   >