RE: [MarkLogic Dev General] Problem preserving whitespaceinanXML-to-XML xquery transform

2009-03-31 Thread Danny Sokolsky
Hi Tim, It looks to me like you are doing this to drive your recursion: cxtn:format-source-by-node($node/following-sibling::node()[1]) I think that is effectively skipping the text node directly following the element (because it is first going to the folowing sibling, which misses that text

RE: [MarkLogic Dev General] Importing xml with unpredictable encoding

2009-03-26 Thread Danny Sokolsky
wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend. From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Danny Sokolsky Sent: woensdag 25 maart 2009 23:49 To: General Mark Logic Developer Discussion Subject

RE: [MarkLogic Dev General] Finding subdirs in a database directory?

2009-03-26 Thread Danny Sokolsky
Another approach to this is to enable the uri lexicon, then do a bunch of string maniputation on the URIs (using cts:uris and a bunch of string functions) to get a listing of the documents and directories. This can make it so you do not need to grab all of the fragments in order to get their

RE: [MarkLogic Dev General] Importing xml with unpredictable encoding

2009-03-25 Thread Danny Sokolsky
Hi Geert, You can specify the encoding with the encoding option to xdmp:document-get or xdmp:document-load. You do have to know the encoding though--it will not use an encoding in a header of the document on its own, and will default to UTF-8. -Danny -Original Message- From:

RE: [MarkLogic Dev General] Importing xml with unpredictable encoding

2009-03-25 Thread Danny Sokolsky
...@developer.marklogic.com] On Behalf Of Danny Sokolsky Sent: woensdag 25 maart 2009 16:43 To: General Mark Logic Developer Discussion Subject: RE: [MarkLogic Dev General] Importing xml with unpredictable encoding Hi Geert, You can specify the encoding with the encoding option

RE: [MarkLogic Dev General] Difference between eNode and Data Node

2009-03-24 Thread Danny Sokolsky
attached to some forests. How this transfer of request is achieved? How eNode can make a call to dNode? Is there any configuration or coding required to achieve this? Can under any scenario eNode access its own forest? Thanks in advance. regards, Saptarshi --- On Mon, 3/23/09, Danny Sokolsky

RE: [MarkLogic Dev General] Difference between eNode and Data Node

2009-03-24 Thread Danny Sokolsky
. Is that possible without writing a lenghty email? Kind regards, Geert -Original Message- From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Danny Sokolsky Sent: dinsdag 24 maart 2009 17:52 To: General Mark Logic Developer

RE: [MarkLogic Dev General] Difference between eNode and Data Node

2009-03-24 Thread Danny Sokolsky
...@developer.marklogic.com] On Behalf Of Danny Sokolsky Sent: dinsdag 24 maart 2009 21:44 To: General Mark Logic Developer Discussion Subject: RE: [MarkLogic Dev General] Difference between eNode and Data Node Yes, any e-node host in the cluster can access any database in the cluster. Think about the d

RE: [MarkLogic Dev General] Difference between eNode and Data Node

2009-03-23 Thread Danny Sokolsky
Hi Geert, Thanks for the great description. I will just add one thing to what you said: Whether a host acts as an e-node or a d-node depends on what it is doing at the time, and a given host in a MarkLogic cluster can behave as an e-node, a d-node, or both. For example, if you have a single

RE: [MarkLogic Dev General] How to output an XML file from MarkLogic inUS-ASCII and with XML version declaration?

2009-03-19 Thread Danny Sokolsky
Hi Tim, You can write a very simple xqy file to do this and execute it either from an HTTP server or invoke it with an XCC program via an XDBC server. First send the xml version identifier as text, then output the document. Something like this: xdmp:set-response-encoding(US-ASCII),

RE: [MarkLogic Dev General] Permission on the document level

2009-03-17 Thread Danny Sokolsky
Hi Galina, I am guessing you mean *permissions* on the document, not privileges. Documents have permissions on them with a role and a capability (read, insert, update, or execute). To read a document, a user needs to have a role corresponding to a permission with a read capability. Users

RE: [MarkLogic Dev General] module prologs

2009-03-12 Thread Danny Sokolsky
Hi Eric, That is a bug in the doc. The NCName is required. The doc should read: xquery version 1.0-ml; module namespace hello = helloworld; declare function helloworld() { hello world }; The XQuery spec syntax is here: http://www.w3.org/TR/xquery/#prod-xquery-ModuleDecl Thanks for

RE: [MarkLogic Dev General] module prologs

2009-03-12 Thread Danny Sokolsky
- From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Florent Georges Sent: Thursday, March 12, 2009 1:17 PM To: General Mark Logic Developer Discussion Subject: Re: [MarkLogic Dev General] module prologs Danny Sokolsky wrote

RE: [MarkLogic Dev General] How to identify a absence of complexnode...

2009-03-12 Thread Danny Sokolsky
This is because cts:not-query is fragment-based, so it returns true only if the specified query does not produce a match anywhere in a fragment. -Danny -Original Message- From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert

RE: [MarkLogic Dev General] Edit library modules through WebDAV?

2009-03-06 Thread Danny Sokolsky
What is your HTTP App Server root set to and what is the URI of the cq modules in the modules database? Make sure your HTTP Server (the one you are running cq on) has a root with a URI that allows you to access cq. For example, if the cq directory is stored in the Modules database at the URI

RE: [MarkLogic Dev General] CORB reporting

2009-03-05 Thread Danny Sokolsky
Hi Jim, Why do you have to update the report document each time you get a hit? How many documents do you expect to match--10, 1000, 10? I am blissfully ignorant of CORB, so maybe (probably...) I am looking at this naively, but it seems like you might be able to do this all in XQuery. I am

RE: [MarkLogic Dev General] Uploading PDF files

2009-03-05 Thread Danny Sokolsky
Hi Pradeep, By default, pdf documents are loaded as binary documents, which will not return any hits for full-text search. To search them, you could set up a CPF application and run them through pdf conversion (which requires the document conversion license), and that will convert the PDF

RE: [MarkLogic Dev General] xdmp:http-get() and multipart response

2009-03-03 Thread Danny Sokolsky
If the request is a POST with a multipart/form-data type, look at the second example in the documentation for xdmp:get-request-field: http://developer.marklogic.com/pubs/4.0/apidocs/AppServerBuiltins.html#xdmp:get-request-field Is that what you are trying to do? -Danny -Original

RE: [MarkLogic Dev General] Webdav Import strips XML DocumentDeclaration

2009-03-02 Thread Danny Sokolsky
Hi Betty, The document that you loaded via WebDAV is stored as XML, but the doctype declarations are not actually part of the XML data model, so they are discarded when loading, after the XML MarkLogic parses the XML. Here is a thread that talks more about this:

RE: [MarkLogic Dev General] search multiple paths

2009-02-24 Thread Danny Sokolsky
Maybe something like this?: cts:search(doc(), cts:and-query(( cts:element-query(xs:QName(metadata), cts:element-word-query(xs:QName(author), John), cts:element-query(xs:QName(metadata), cts:element-word-query(xs:QName(original-content),

RE: [MarkLogic Dev General] Hit Highlight Snippet

2009-02-23 Thread Danny Sokolsky
Hi Pradeep, If you look in the cts:highlight chapter of the Developer's Guide in the documentation, it shows the design pattern of using cts:highlight to create snippets. The idea is to do your search, then do a recursive transformation over each search result and retrieve what you are

RE: [MarkLogic Dev General] database backup

2009-02-18 Thread Danny Sokolsky
Hi Pradeep, The /backups/SAMP-DATABASE/ directory must exist and be readable and writable by daemon (or whatever user MarkLogic is running as) in order for the backup to succeed. In some cases, the parent directory must be writable too. -Danny From:

RE: [MarkLogic Dev General] UNICODE/ANSI Issue

2009-02-18 Thread Danny Sokolsky
Hi Vivek, MarkLogic Server stores UTF-8 characters. You can specify the output encoding for the App Server (UTF-8 is the default). Also, you can specify the encoding upon ingestion to MarkLogic Server with the encoding option to xdmp:document-get or xdmp:document-load, which will translate

RE: [MarkLogic Dev General] Atomicandexclusivelockondocuments(accross a cluster)

2009-02-11 Thread Danny Sokolsky
-boun...@developer.marklogic.com] On Behalf Of Danny Sokolsky Sent: dinsdag 10 februari 2009 23:34 To: General Mark Logic Developer Discussion Subject: RE: [MarkLogic Dev General] Atomic andexclusivelockondocuments(accross a cluster) To explain why storing the lock on the property will work

RE: [MarkLogic Dev General] stemmed searches

2009-02-10 Thread Danny Sokolsky
The basic approach is to expand your search to search across the languages you are interested in. For example, if a user enters a search term: cat chat and your content is in English and French, then you can expand into the following cts:query: cts:or-query((

RE: [MarkLogic Dev General] Atomic and exclusivelockondocuments(accross a cluster)

2009-02-10 Thread Danny Sokolsky
...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Danny Sokolsky Sent: dinsdag 10 februari 2009 20:16 To: General Mark Logic Developer Discussion Subject: RE: [MarkLogic Dev General] Atomic and exclusive lock ondocuments(accross a cluster) You can store your locks

RE: [MarkLogic Dev General] search multiple paths

2009-02-06 Thread Danny Sokolsky
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

RE: [MarkLogic Dev General] search multiple paths

2009-02-06 Thread Danny Sokolsky
wrapper element). -Danny From: Pradeep Maddireddy [mailto:pradeep.maddire...@htcinc.com] Sent: Friday, February 06, 2009 2:24 PM To: Danny Sokolsky; General Mark Logic Developer Discussion Subject: RE: [MarkLogic Dev General] search multiple paths Hi Danny, The query was running

RE: [MarkLogic Dev General] XDMP-MEMORY: Memory exhausted

2009-01-28 Thread Danny Sokolsky
Hi Sundeep, Your query is loading a million documents in a single transaction, so it is not surprising that you are running out of memory. I would recommend breaking this up into smaller transactions. One way to do this is to use xdmp:spawn to put these on the task server to load

RE: [MarkLogic Dev General] Problem with default XQuery version

2009-01-26 Thread Danny Sokolsky
Is it possible that your XCC/Java program is running some other query (maybe one that is expecting to run as 0.9-ml, but is defaulting to 1.0-ml in your setup)? What does your XCC program look like? -Danny -Original Message- From: general-boun...@developer.marklogic.com

RE: [MarkLogic Dev General] What is the Scope of Search Relevance inMarkLogic?

2009-01-26 Thread Danny Sokolsky
Hi Mike, The calculations are based on the number of fragments in the database, so yes, your search scores will be affected by duplicate content in /create and /preview. Relevance is calculated (by default) using the log-tf*idf formula (log of term frequency times the inverse document

RE: [MarkLogic Dev General] xdmp:node-insert-child, xmlns and computedconstructors

2009-01-26 Thread Danny Sokolsky
Hi Eric, The xmlns attribute is not exactly an attribute, and for some obscure/arcane XML and XQuery specification reasons that I cannot adequately explain here, you are not allowed to use an attribute constructor to construct the special xmlns attribute and have that value be your default

RE: [MarkLogic Dev General] Commit in XQUERY

2009-01-20 Thread Danny Sokolsky
(from the Admin Interface). If you send the entire query you are trying to run it might help to figure out what is going on. -Danny -Original Message- From: Pradeep Maddireddy [mailto:pradeep.maddire...@htcinc.com] Sent: Tuesday, January 20, 2009 7:58 AM To: Danny Sokolsky; General Mark

RE: [MarkLogic Dev General] Document insert - Unknownerror.:-1073741819

2009-01-16 Thread Danny Sokolsky
server. Regards, Sundeep From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Danny Sokolsky Sent: Friday, January 16, 2009 2:49 AM To: General Mark Logic Developer Discussion Subject: RE: [MarkLogic Dev

RE: [MarkLogic Dev General] Commit in XQUERY

2009-01-15 Thread Danny Sokolsky
Hi Pradeep, There is no need to use both xdmp:document-load and xdmp:document-insert in the same statement, just choose one of them. For example, you can construct the document using XQuery (including your metadata), then use xdmp:document-insert to store your abc.xml document in the database

RE: [MarkLogic Dev General] Document insert - Unknown error.:-1073741819

2009-01-15 Thread Danny Sokolsky
Hi Sundeep, Does this happen on all pdf documents or just this one? What version of MarkLogic Server and what version of Windows are you running? To find the MarkLogic version run: xdmp:version(), xdmp:platform(), xdmp:architecture() -Danny From:

RE: [MarkLogic Dev General] Commit in XQUERY

2009-01-15 Thread Danny Sokolsky
Hi Pradeep, What is the exact error message you are getting with a large file? -Danny -Original Message- From: Pradeep Maddireddy [mailto:pradeep.maddire...@htcinc.com] Sent: Thursday, January 15, 2009 12:22 PM To: Danny Sokolsky Cc: General Mark Logic Developer Discussion Subject

RE: [MarkLogic Dev General] xdmp:http-get and gzip

2009-01-06 Thread Danny Sokolsky
The zip built-ins (xdmp:zip-get et al) do not do gzip, just zip. You will have to send the binary content off somewhere else (to Java for example, or preprocess it before it gets to MarkLogic) to gunzip it. If it was zip you could make it work completely within MarkLogic Server. Maybe there is a

RE: [MarkLogic Dev General] Re: [MarkLogicDev General] absolutepath: xdmp:document-getvs xdmp:uri-is-file

2008-12-18 Thread Danny Sokolsky
xml file from an xqy file though. Eric Danny Sokolsky wrote: If it is under the App Server root, you can always use http to get it (xdmp:http-get, for example). Or xdmp:document-get. Or you can put it in a global variable in an xquery module that you import (the import can be relative

RE: [MarkLogic Dev General] How best to identify all referenced contentmodels?

2008-12-18 Thread Danny Sokolsky
Hi Brent, Do you have the URI lexicon enabled for your database? It might help. Also, do you have any range indexes on the element or attributes in question? Then you can do range queries or lexicon lookups on those values. I am not sure what you mean by your concern about DTDs and

RE: [MarkLogic Dev General] How best to identify all referencedcontentmodels?

2008-12-18 Thread Danny Sokolsky
...@developer.marklogic.com] On Behalf Of Danny Sokolsky Sent: Thursday, December 18, 2008 1:12 PM To: General Mark Logic Developer Discussion Subject: RE: [MarkLogic Dev General] How best to identify all referenced contentmodels? Hi Brent, Do you have the URI lexicon enabled for your database?  It might help.  Also

RE: [MarkLogic Dev General] absolute path: xdmp:document-getvs xdmp:uri-is-file

2008-12-17 Thread Danny Sokolsky
I don't know of another way besides try/catch (which is great for this type of thing). -Danny -Original Message- From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Eric Palmitesta Sent: Wednesday, December 17, 2008 12:44 PM To:

RE: [MarkLogic Dev General] Collation Lexicon Frequency

2008-12-17 Thread Danny Sokolsky
One approach is to use a space-insensitive collation for the range index. Then these would appear the same. Here is a simple example: xquery version 1.0-ml; declare default collation http://marklogic.com/collation/en/S1/AS;; hello there = hellothere (: returns true :) -Danny

RE: [MarkLogic Dev General] Re: XDBC creation / access

2008-12-05 Thread Danny Sokolsky
:48 AM To: General Mark Logic Developer Discussion Subject: Re: [MarkLogic Dev General] Re: XDBC creation / access 2008/12/4 Danny Sokolsky [EMAIL PROTECTED]: Actually, all of the character set encodings listed in that Dev Guide chapter are supported (there are many of them); UTF-8 and ISO-8859-1

RE: [MarkLogic Dev General] Re: XDBC creation / access

2008-12-03 Thread Danny Sokolsky
Hi Dave, All content in MarkLogic Server is stored in UTF-8. There are mechanisms in the server for transcoding other encodings to UTF-8. These are accessible via several loading built-in XQuery functions, such as xdmp:document-load (see the encoding option):

RE: [MarkLogic Dev General] i want to display attributes under elementname

2008-12-03 Thread Danny Sokolsky
One way you can get this is to recursively walk the XML document, printing out the name of the elements and attributes along the way. Then take the distinct-values of your resulting transformation. Here is some simple code that does that with your sample data: xquery version 1.0-ml; declare

RE: [MarkLogic Dev General] entity enrichment

2008-12-02 Thread Danny Sokolsky
You can use cts:entity-highlight to create something that only operates on certain $cts:entity-types: http://developer.marklogic.com/pubs/4.0/apidocs/SearchBuiltins.html#cts: entity-highlight -Danny -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vidhya

RE: [MarkLogic Dev General] Does xdmp:document-add-permissions give arole the requested access permission on all documents in adirectory?

2008-12-02 Thread Danny Sokolsky
It only modifies the permissions for the specified URI, whether that URI is a document or a directory. If you want to add a permission to each document in the directory, you must update each document's permissions. -Danny -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

RE: [MarkLogic Dev General] How to count items in the database bymultiple file extensions?

2008-11-25 Thread Danny Sokolsky
That seems reasonable to me, as you have to do 1 million x 12 matches. Assuming everything in your database has a URI starting with a / though, the directory-query does not buy you anything (as it matches all documents). If you were able to constrain that directory query more, you might make

RE: [MarkLogic Dev General] help me: error : can not updateexternal nodes

2008-11-21 Thread Danny Sokolsky
Hi Aparna, I think the issue is that you are trying to do multiple xdmp:node-replace operations on the same document with evals, when that document is already locked by the calling document. This will result in a deadlock, because the calling query is locking the document that eval is trying to

RE: [MarkLogic Dev General] Can XCC make use of library modules?

2008-11-19 Thread Danny Sokolsky
Hi Eric, You are correct, you can only execute a main module. If you want to execute a function in a library module, you have to call that function from a main module. Note that you can also create functions in a main module, but those functions are only available to that main module. This is

RE: [MarkLogic Dev General] cts:element-attribute-contains-query? or*word-query option? or regex please?

2008-11-14 Thread Danny Sokolsky
Hi Shannon, You can do a wildcarded search to find that. Something like: let $query := cts:element-attribute-word-query(xs:QName(div), xs:QName(xml:id), Dia*, wildcarded) let $node := div xml:id=Dia01ch10m4.5/ return cts:contains($node, $query) Adding some wildcard indexes

RE: [MarkLogic Dev General] Empty argument fails silently?

2008-11-06 Thread Danny Sokolsky
And if you decide you want to use it in a module, you can still do so in 1.0 by enabling it in the prolog as in the following example (in 1.0, you also have to declare the xdmp namespace). If is disabled by default in 1.0 and enabled by default in 1.0-ml. xquery version 1.0; declare namespace

RE: [MarkLogic Dev General] PDF Full Text Search

2008-11-04 Thread Danny Sokolsky
Hi Paul, You need to convert PDF and Office to XML in order to search it. To convert PDF and Office within MarkLogic Server, you need a license key that supports the conversion option. You are correct, you can load the documents as binary without the conversion option, but you cannot

RE: [MarkLogic Dev General] embedded html

2008-10-30 Thread Danny Sokolsky
Hi Paul, You are not being specific about *exactly* what you are doing, so it is hard to tell for sure what is going on. My guess, though, is that the namespace being used is picked up from your XQuery context. The following example I think does what you are trying to do: (: create a

RE: [MarkLogic Dev General] Improving Lookup Performance

2008-10-29 Thread Danny Sokolsky
As a first step, try putting the predicate at the end of your XPath expression. Something like this: fn:collection()/doc/item/classification/[EMAIL PROTECTED] = class1] Does that help? -Danny -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steve

RE: [MarkLogic Dev General] Improving Lookup Performance

2008-10-29 Thread Danny Sokolsky
[mailto:[EMAIL PROTECTED] Sent: Wednesday, October 29, 2008 9:28 AM To: Danny Sokolsky Subject: Re: [MarkLogic Dev General] Improving Lookup Performance Thanks, for that. That seems to give me a bit of a performance boost. However, it's given me a new problem. This type of predicate just returns

RE: [MarkLogic Dev General] (no subject)

2008-10-27 Thread Danny Sokolsky
Another possibility is, if this code is in the body of a main module, you can separate them into separate transactions by putting a semi-colon after the first document-insert. This might also eliminate the need for the eval (depending on what else you are doing in the query). For example:

RE: [MarkLogic Dev General] module declaration boilerplate

2008-10-20 Thread Danny Sokolsky
Hi Eric, This is a difference between the May 2003 XQuery syntax and the XQuery 1.0 recommendation syntax. MarkLogic Server 3.2 supports the May 2003, and MarkLogic 4.0 supports the XQuery 1.0 recommendation (as well as the May 2003 in with xquery version 0.9-ml in the XQuery declaration). So

RE: [MarkLogic Dev General] Language Support

2008-10-08 Thread Danny Sokolsky
Hi Shannon, You can do a cts:or-query with different language queries. For example, the following returns true for both cts:contains expressions: let $x := doc div punanimous suffrages/p /div div p xml:lang=fret qui atteste Les Suffrages

RE: [MarkLogic Dev General] What is the URI of the doc that isloadedfrom admin panel ?

2008-09-26 Thread Danny Sokolsky
/Program Files/etc. But, this URI (or, any of its variants) would never work for me as doc-available() would always return false. oh yes, I did try URL encoding the blank space too. Nagesh On 9/26/08, Danny Sokolsky [EMAIL PROTECTED] wrote: If you are referring to the load tab on the database

RE: [MarkLogic Dev General] Fileuploading using spawn

2008-09-15 Thread Danny Sokolsky
Hi, It looks like you are not passing anything into your call to xdmp:spawn. You need to pass in the external variable $x along with its value (that you are getting from your FLOWR). Note that it is not the same as the $x from your load.xqy module, as those two modules run in different

RE: [MarkLogic Dev General] Set the Modules and Documents DB to be thesame?

2008-09-08 Thread Danny Sokolsky
The directory browser shows up. -Original Message- From: Florent Georges [mailto:[EMAIL PROTECTED] Sent: Monday, September 08, 2008 9:40 AM To: Danny Sokolsky; General Mark Logic Developer Discussion Subject: Re: [MarkLogic Dev General] Set the Modules and Documents DB to be thesame? Danny

RE: [MarkLogic Dev General] FW: Marklogic 3.1

2008-09-08 Thread Danny Sokolsky
It looks to me like you have the right idea there, but there are a few details that are not quite right. (Also, you might think about upgrading to 3.2) What I tried is the following: * created Int range indexes on the elements intValueLo and intValueHi elements * inserted the following into

RE: [MarkLogic Dev General] Set the Modules and Documents DB to be thesame?

2008-09-07 Thread Danny Sokolsky
Hi, This is an error in the doc. That should say HTTP Server instead of WebDAV server. The idea is that you have to set your modules database (the db that stores the XQuery code being executed) to be the same database as the database in which your content is stored. Here is how that

RE: [MarkLogic Dev General] Content Repair Functionality

2008-09-04 Thread Danny Sokolsky
For the invalid UTF-8 characters, if you know the encoding of the source document, you can specify it on load using the encoding option of xdmp:document-load. You can also use the repair option if you have XML repair issues. For example, if you know the content is encoded using ISO-8859-1, you

RE: [MarkLogic Dev General] limiting words in search results

2008-08-20 Thread Danny Sokolsky
Hi Mindie, As David said, the function you are looking for is cts:highlight. It looks like you are trying to create a search snippet, sort of like on a google search page. There are lots of ways to do this, but generally, it involves running each search result through cts:highlight to find

RE: [MarkLogic Dev General] Schema aware XQuery andXML SerializationOptions in ML 3.2?

2008-08-12 Thread Danny Sokolsky
SerializationOptions in ML 3.2? Thanks, Danny. I will give that a try, and have a look through the older messages. Do you need to have a target namespace in the schema to use it, or will it work without namespaces? Also, any ideas on the serialization stuff? Cheers, -Steve Danny Sokolsky wrote: Hi Steve

RE: [MarkLogic Dev General] Forests and Collections querying problem

2008-08-11 Thread Danny Sokolsky
, 2008-08-10 at 00:47 -0700, Danny Sokolsky wrote: xdmp:describe(fn:collection(MDCOL)[1]/node()) ___ General mailing list General@developer.marklogic.com http://xqzone.com/mailman/listinfo/general

RE: [MarkLogic Dev General] Schema aware XQuery and XML SerializationOptions in ML 3.2?

2008-08-11 Thread Danny Sokolsky
Hi Steve, I think you need something like this: import schema uri-of-your-schema-you-are-importing at schema-path declare namespace foo=uri-of-your-schema-you-are-importing define variable $input as element(foo:result) { doc('myfile.xml')/* } You are correct that schemas are used for typing.

RE: [MarkLogic Dev General] Rationalized element range queries

2008-08-11 Thread Danny Sokolsky
Hi Stewart, I am not positive I understand your question, but I will give it a try anyway If you use plain XPath, you can use a predicate to constrain on an attribute and then return the element text nodes. For example: let $x := paraThe topics topic-ref

RE: [MarkLogic Dev General] Rationalized element range queries

2008-08-11 Thread Danny Sokolsky
-attribute-values index with a list of canonical terms. Don't know how well that would perform, though. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Danny Sokolsky Sent: Monday, August 11, 2008 7:17 PM To: General Mark Logic Developer Discussion Subject: RE

RE: [MarkLogic Dev General] Forests and Collections querying problem

2008-08-10 Thread Danny Sokolsky
-08 at 23:19 -0700, Danny Sokolsky wrote: Hi Darren, Are you sure the document was loaded as XML and not as text or binary? try: xdmp:describe(fn:collection(MDCOL)[1])/node() You might also want to get cq from the workshop on the developer site. It will make it easy to run queries

RE: [MarkLogic Dev General] Forests and Collections querying problem

2008-08-08 Thread Danny Sokolsky
Hi Darren, When you load documents into a database, unless you explicitly state the forest to which it is loaded (with a forest placement key), the system will automatically choose a forest for each document during the load process (this explains why you see the forests randomly increment their

RE: [MarkLogic Dev General] Indexes and query tuning

2008-08-04 Thread Danny Sokolsky
Hi Rob, Here are a few ideas. 1) If you can get away with not starting the lexicon lookup with a wildcard character, it will probably help a lot. For example, concat($q, *) for your match string instead. 2) Those other index options you mentioned will help with cts:query

RE: [MarkLogic Dev General] Newbee question - License upgrade

2008-07-28 Thread Danny Sokolsky
To enter a new license key: * open the Admin Interface (http://localhost:8001) * Navigate to the host page for the server in which you are adding a new key * click the status tab * click the license key button * enter the new information and click ok. -Danny From: [EMAIL PROTECTED]

RE: [MarkLogic Dev General] Unicode flattening fornoncombinedcharacters.

2008-07-21 Thread Danny Sokolsky
. Out of curiosity (not that I think this will help you, but it could help us help this problem in the future), is there a collation that matches the customer's requirements? Cheers ian -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Danny

RE: [MarkLogic Dev General] English auxiliary verbs match oneanotherunexpectedly

2008-07-17 Thread Danny Sokolsky
Hi Simon, A few other points worth noting here: If you want stemming to occur on mixed case or all cap words, you can use the case-insensitive option to the query. Using an example similar to yours, you can run this: let $el := EleAM/Ele for $i in (ARE,BE,IS,AM, BEEN, WAS) return if

RE: [MarkLogic Dev General] cts:highlight() issue

2008-07-11 Thread Danny Sokolsky
Hi Charles, This issue has been fixed for a long time (~18 months). -Danny -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Charles Blair Sent: Thursday, July 10, 2008 9:59 AM To: general@developer.marklogic.com Subject: [MarkLogic Dev General]

RE: [MarkLogic Dev General] Triggers works fine when document createdusing xdmp:document-insert, but not when document loaded using webdav

2008-07-10 Thread Danny Sokolsky
Hi Isha, Is it possible that your trigger scope does not cover the root of the WebDAV server? To answer this: * What is the document-insert URI that is successfully firing the trigger? * What is the root of the WebDAV server? * What is the trigger definition? Also, you say my WebDAV

RE: [MarkLogic Dev General] Restricting Search Hits To Immediate ParentContainers

2008-07-01 Thread Danny Sokolsky
Hi John, This can be a little tricky, as it sounds like your section elements can mean different things in different places in the document. One approach can be to change your section element names for the ones that have p children to something different, and then search over those. It would be

RE: [MarkLogic Dev General] Restricting Search Hits ToImmediateParentContainers

2008-07-01 Thread Danny Sokolsky
PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Danny Sokolsky Sent: Tuesday, July 01, 2008 4:27 PM To: General Mark Logic Developer Discussion Subject: RE: [MarkLogic Dev General] Restricting Search Hits To ImmediateParentContainers Hi John, This can be a little tricky, as it sounds like your

RE: [MarkLogic Dev General] Adding more cts:queries and increasingweight lowers scores?

2008-06-24 Thread Danny Sokolsky
Hi Mattio, Scores are only designed to be compared to other scores that come from the *same* search. The idea of scores is to affect the relevance of search matches compared with other search matches, not to be absolute numbers; that is, it will affect the order in which search results are

RE: [MarkLogic Dev General] Order by question

2008-05-05 Thread Danny Sokolsky
cts:search returns results in relevance order. If you want to order on something else, you need to bring back all of the results and then sort them. For example, you can sort them using a FLWOR with an order by clause: for $x in cts:search(of something) order by $x/mynode return $x If

RE: [MarkLogic Dev General] word boundaries

2008-05-05 Thread Danny Sokolsky
Well, there are many ways to do what you describe, but not having the specifics of what you are trying to do, I will try and describe one easy way. Say you want to find documents that have the word dog in them. You can then do a cts:search of all of your documents with a word query that

RE: [MarkLogic Dev General] Boosting scores based on an attribute

2008-04-10 Thread Danny Sokolsky
for how to work Boolean logic into this would be appreciated! On 4/10/08, Danny Sokolsky [EMAIL PROTECTED] wrote: Perhaps you can add another query to your or query list looking for the attribute value and boosting the score. I think this will work as long as you know the element in which the type

RE: [MarkLogic Dev General] how to implement an accumulator

2008-03-13 Thread Danny Sokolsky
Well, here is one way (this uses the Shakespeare database): fn:count(cts:search(//SPEECH, cts:element-value-query(xs:QName(SPEAKER), HAMLET))/LINE) Hamlet has 1495 lines. or if you want them all: ALL{ for $x in fn:distinct-values(//SPEAKER/text()) return SPEAKER

RE: [MarkLogic Dev General] versioning of data

2008-02-04 Thread Danny Sokolsky
Hi Mark, If what you mean by versioning is check in/check out, then the answer to your question is that one can build an application that versions documents with MarkLogic. Because MarkLogic Server supports transactions, you can build an application that would keep track of the versions of a

RE: [MarkLogic Dev General] Question

2008-01-30 Thread Danny Sokolsky
Hi Stefan, I'm not sure I understand your question, but I'll give it a try. MarkLogic Server stores documents, and for XML documents, you can query them by their XML structure. Queries span all of the documents in the database, so if you issue a query like the following simple XPath expression:

RE: [MarkLogic Dev General] Microsoft Open XML standard

2008-01-22 Thread Danny Sokolsky
You can do tons of stuff with Office 2007 documents in MarkLogic Server. See Pete Aven's awesome series of blogs on the topic for a lot of detail in what you can do and how you can do it: http://developer.marklogic.com/columns/smallchanges/2008-01-08.xqy -Danny From: [EMAIL PROTECTED]

RE: [MarkLogic Dev General] if then else

2007-12-13 Thread Danny Sokolsky
Hi Paul, I don't see any real problem with relatively large if/then/else expressions, if your logic requires it. They usually perform quite well (I'm not sure how big rather large is). I suppose you could encode the logic into an XML structure and use XPath to get to perform your tests, as

RE: [MarkLogic Dev General] simple cts:search question

2007-12-06 Thread Danny Sokolsky
I think the problem is that the cts:element-query is on the carList element, and it should be on the car element. -Danny -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jacob Meushaw Sent: Thursday, December 06, 2007 8:58 AM To:

RE: [MarkLogic Dev General] simple cts:search question

2007-12-06 Thread Danny Sokolsky
to cts:search), but in my experience cts:element-query doesn't include itself in its scope, only its descendants, so I don't think the change you are suggesting will solve his problem? I put in a change request to correct that: it seems like the behavior everyone expects. -Mike Danny Sokolsky

RE: [MarkLogic Dev General] Passing sequence as variable to xdmp:eval()?

2007-11-29 Thread Danny Sokolsky
Hi David, Yes, that is correct, you cannot pass a sequence as the value of an external variable. As you surmised, the way to do that is to wrap the sequence values in XML and pass the node. Then you can use XPath to get the values from the node. Also, you can pass as many external variables as

RE: [MarkLogic Dev General] Needing to wait for document update

2007-11-29 Thread Danny Sokolsky
Hi Neil, Since you did not include your code, it is hard to tell exactly what is happening in your application. But yes, there are nice ways to accomplish what you want. MarkLogic is fully transactional, so it is designed to do this type of thing. There are a number of ways to do this. If

RE: [MarkLogic Dev General] Index function in xquery

2007-10-31 Thread Danny Sokolsky
Hi Rashid, fn:tokenize on an empty string is probably not the best idea, as the regex of an empty string matches things you probably don't mean for it to match (for example, the it matches the empty string at the beginning of the string). Also, in the latest version of the XQuery spec, it will

RE: [MarkLogic Dev General] querying multiple words w/AND semantics

2007-09-13 Thread Danny Sokolsky
Hi Mike, cts:element-attribute-word query and cts:field query are leaf-level constructors, just like cts:word-query. You can use the composable constructors like cts:and-query to combine these leaf-level constructors. So I believe you can achieve what you need by using something like this:

RE: [MarkLogic Dev General] Diacritical insensitive search

2007-08-30 Thread Danny Sokolsky
Peter, You are correct in your analysis. The character Ł is not a diacritic, as it does not decompose to an L and a slash, as you say. You can verify that by running the following: xdmp:diacritic-less(Ł) which returns Ł. Using collations, it is possible to choose a collation that will

RE: [MarkLogic Dev General] Re: Fwd: performance question

2007-07-06 Thread Danny Sokolsky
2007 From: dsokolsky at marklogic.com (Danny Sokolsky) Date: Thu Jul 5 18:02:20 2007 Subject: [MarkLogic Dev General] performance question In-Reply-To: [EMAIL PROTECTED] Message-ID: [EMAIL PROTECTED] Hi Helen, Have you tried using value lexicons to do this? Value lexicons use range indexes

RE: [MarkLogic Dev General] performance question

2007-07-05 Thread Danny Sokolsky
Hi Helen, Have you tried using value lexicons to do this? Value lexicons use range indexes and the cts:element-values and cts:element-value-match APIs. There are several ways you might accomplish this with lexicons. For example, you could create 3 string range indexes, one on each of the

<    2   3   4   5   6   7   8   >