RE: [MarkLogic Dev General] Problem with xdmp:invoke module

2010-04-21 Thread Glidden, Douglass A
The problem is this line: xquery version "1.0"; Instead use: xquery version "1.0-ml"; Try/catch blocks are part of the MarkLogic extensions to XQuery and are not available with standard XQuery 1.0. Doug Glidden Software Engineer The Boeing Company douglass.a.glid...@boeing.com

RE: [MarkLogic Dev General] Break statement in FLWOR

2010-03-30 Thread Glidden, Douglass A
Mano, I don't think the concept of a break is something that fits into XQuery's declarative programming paradigm. In particular, if I recall correctly, the return expression (R in FLOWR) may never be omitted or skipped. If you want to return, say, an empty sequence if a particular condition i

RE: [MarkLogic Dev General] element-value-query with wildcards

2010-02-09 Thread Glidden, Douglass A
Dom, I would guess that this issue has to do with word boundaries. When you do an element-value-query for '139*', you are searching for only elements whose values contain a single word starting with '139' (because '*' does not match on word boundaries), but the slashes in your desired value ar

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

2010-01-20 Thread Glidden, Douglass A
Helen, I'm not sure this will make a difference, but try these alternatives: fn:base-uri(doc()/ns1:article//ns1:sub[not(@temp1 or @temp2)]) fn:document-uri(doc()[ns1:article//ns1:sub[not(@temp1 or @temp2)]]) I'm not sure (internally) how this usage differs from the other, so it may or may

RE: [MarkLogic Dev General] How to get cts:element-value-query()tonotdecend to the depths of Hades

2009-12-23 Thread Glidden, Douglass A
case > insensitivity. Turning those into pure xquery expressions then results in > searches that dont perform very well (atleast for me). > > > From: general-boun...@developer.marklogic.com on behalf of Glidden, > Douglass A > Sent: Tue 12/22/2009 8:25 AM > To: general@develope

RE: [MarkLogic Dev General] How to get cts:element-value-query() to notdecend to the depths of Hades

2009-12-22 Thread Glidden, Douglass A
David, I realize I'm a little late with my answer, but just to throw another option into the pool, did you consider getting rid of the cts:search completely? That is, if I were doing something like this, I would be inclined to do it entirely with XPath: fn:doc("doc")/doc[name="Sub Part"] I r

RE: [MarkLogic Dev General] dateTime format, range queries,and misbehaving cts:and-queries

2009-12-15 Thread Glidden, Douglass A
Karl, Regarding Question #1: Mark Logic is simply following the definition of the dateTime data type in the XSD specification (which is where XML data types are defined) here (http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#dateTime); I can't speak for Mark Logic, but I suspect it would ta

RE: [MarkLogic Dev General] Return Attribute Data

2009-12-08 Thread Glidden, Douglass A
Your code is trying to assign all of the id attributes from all of the interface elements to a single "item" element-hence the "two attributes with the same name" error. Instead try: ... return for $if in $docs/interface return ... Doug Glidden (703) 317-7523 http://dougglidden.blog.boein

RE: [MarkLogic Dev General] search for non-existing elements

2009-11-19 Thread Glidden, Douglass A
...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Glidden, Douglass A Sent: Thursday, November 19, 2009 1:25 PM To: general@developer.marklogic.com Subject: RE: [MarkLogic Dev General] search for non-existing elements A word of warning, unless you're 100%

RE: [MarkLogic Dev General] search for non-existing elements

2009-11-19 Thread Glidden, Douglass A
A word of warning, unless you're 100% certain that your indices are set up such that the query inside the cts:not-query will _never_ need filtering, cts:not-query can miss correct results. The cts:not-query is one of the only queries that can err in failing to return positive matches (i.e. it g

RE: [MarkLogic Dev General] question regarding a code snippet..

2009-11-11 Thread Glidden, Douglass A
Also, "!" is not a valid operator in Xquery. In fact, there is no logical NOT operator in Xquery (http://www.w3.org/TR/2001/WD-xquery-20010607/#section-Logical-operators). Use the function fn:not() instead. Doug Glidden Software Engineer The Boeing Company douglass.a.glid...@boeing.com -

RE: RE: [MarkLogic Dev General] X-path not working in XML Fileshaving name space reference!!!!

2009-11-04 Thread Glidden, Douglass A
If all of your elements are in the http://docbook.org/ns/docbook namespace and you don't want to have to bother with the "db:" prefix on every element in your XPath, you could try the following alternative: xquery version "1.0-ml"; (: buffer 2 :) declare default element namespace "http://docbook

RE: [MarkLogic Dev General] Merge 2 xml files

2009-11-03 Thread Glidden, Douglass A
Sai, This should work for both cases and be extensible to quite a few more. Note: I don't claim that this is necessarily the most efficient way to do this for large data sets, but it works. let $xmls := ($xml1, $xml2) for $file-id in fn:distinct-values($xmls/@id) let $paras

RE: [MarkLogic Dev General] Merge 2 xml files

2009-11-03 Thread Glidden, Douglass A
g.com _ From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Glidden, Douglass A Sent: Tuesday, November 03, 2009 16:21 To: general@developer.marklogic.com Subject: RE: [MarkLogic Dev General] Merge 2 xml files Sai, This should work for

RE: [MarkLogic Dev General] ML and Windows 2008

2009-11-02 Thread Glidden, Douglass A
Perhaps this is obvious, but I've learned to always eliminate the obvious first. :-) Have you verified that the firewall on your Win 2008 server is allowing connections to port 8001? My experience has been that this port is generally disallowed by default. If that is not the issue, I think yo

RE: [MarkLogic Dev General] Generate CSV Output

2009-10-21 Thread Glidden, Douglass A
Yes, that's correct-an easy way to do it might be with the fn:string() function: local:return-in-csv((fn:string($id), fn:string($description), fn:string($city), fn:string($country), fn:string($hosts))) That will convert any empty sequences to empty strings. Not saying that's necessarily the be

RE: [MarkLogic Dev General] Generate CSV Output

2009-10-21 Thread Glidden, Douglass A
Tony, The way you've entered it here, there's no way this function can work at all, because it has a couple of syntax errors: * It is missing an else (on the let $field2 :=... line). * It is missing a $ (on the let $field3 :=... line). * The "codepoints-to-string" functio

RE: [MarkLogic Dev General] how xdmp:node-replace works

2009-10-13 Thread Glidden, Douglass A
Rahul, I noticed that both of the request fields that are returning empty have names starting with a capital letter ("Year" and "Title"). I believe field names are case-sensitive, so if your calling code is using lower case field names ("year" and "title"), this could be causing your problem.

RE: [MarkLogic Dev General] Difference between two queries

2009-10-13 Thread Glidden, Douglass A
Rahul, The fn:doc function takes a URI (a string), but in your second case you are passing it whatever is selected by the XPath /documents/book2-which is most likely an empty sequence, which is automatically cast to an empty string. If the URI of your document is really /documents/book2, then

RE: [MarkLogic Dev General] Can someone explain how I cangetthefollowing info

2009-10-08 Thread Glidden, Douglass A
Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend. _ From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklo

RE: [MarkLogic Dev General] Can someone explain how I can getthefollowing info

2009-10-07 Thread Glidden, Douglass A
Geert's way too fast for me. :-) Doug Glidden Software Engineer The Boeing Company douglass.a.glid...@boeing.com _ From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of ma...@comcast.net Sent: Wednesday, October 07, 2009 13:30 To:

RE: [MarkLogic Dev General] Can someone explain how I can get thefollowing info

2009-10-07 Thread Glidden, Douglass A
Corrections inline below. There might be additional errors I missed. Doug Glidden Software Engineer The Boeing Company douglass.a.glid...@boeing.com _ From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of ma...@comcast.net Sent:

RE: [MarkLogic Dev General] Format XML Results

2009-10-01 Thread Glidden, Douglass A
Tony, Try something like this (assuming the element is stored in a variable called $results): { for $if in $results/interface return { $results/name, $results/date, $if/id, $if/address } } Depending on how your query works, it would probably be more efficien

RE: [MarkLogic Dev General] Solution for local university

2009-09-14 Thread Glidden, Douglass A
I believe this information about clustering is correct; furthermore, you will be out of luck if your grading server is a quad-core server, because the Community License is restricted to two CPUs. Of course, if you're running on a virtualized infrastructure, this won't be a problem. Doug Glidden S

RE: [MarkLogic Dev General] RE: Multiple Results Retreived

2009-08-10 Thread Glidden, Douglass A
Geert, I've seen you mention this a couple of times, and I got a little curious this time. I ran a little test, with the finding that cts:search(doc()//para, ...) and cts:search(doc(), ...)//para are not equivalent. The first search will return only those para elements for which the cts:que

RE: [MarkLogic Dev General] xml to object

2009-07-02 Thread Glidden, Douglass A
XMLBeans (http://xmlbeans.apache.org/) is what I've always used. Doug Glidden Software Engineer The Boeing Company douglass.a.glid...@boeing.com _ From: Paul M [mailto:pjm...@yahoo.com] Sent: Thursday, July 02, 2009 11:45 To: general@developer.marklogic.com Subject: [MarkLogic Dev

RE: [MarkLogic Dev General] RE: how to debug

2009-06-29 Thread Glidden, Douglass A
Jakob, What is the URL you use to access CQ? If CQ and your modules are on the same HTTP server (I'm assuming they are, since a relative path would not work if they are not), make sure that your "relative" path is actually relative to the location of CQ. For instance, on my server, CQ is loca

RE: [MarkLogic Dev General] Can someone explain what the wildcardsearch problem was that was fixed in 4.0.5?

2009-06-22 Thread Glidden, Douglass A
Tim, The particular issue that was being discussed in that thread involved a bug only in cts:element-attribute-value-queries with wildcards, so I don't think it applies to your situation. A couple of notes on your situation: * Just to make sure, you realize that your two search

[MarkLogic Dev General] RE: [MarkLogic DevGeneral] element-value-query vs. element-attribute-value-query behavior difference

2009-06-11 Thread Glidden, Douglass A
neral-boun...@developer.marklogic.com] On Behalf Of Glidden, Douglass A Sent: Wednesday, June 10, 2009 12:29 PM To: general@developer.marklogic.com Subject: RE: [MarkLogic Dev General]element-value-queryvs.element-attribute-value-query behavior difference Danny, I executed both the cts:contai

RE: [MarkLogic Dev General] element-value-query vs. element-attribute-value-query behavior difference

2009-06-11 Thread Glidden, Douglass A
ntains returns true the corresponding cts:search returns the node (and vice versa). -Danny From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Glidden, Douglass A Sent: Wednesday, June 10, 2009 12:29 PM To: general@developer.marklogic.com Subj

RE: [MarkLogic Dev General]element-value-queryvs.element-attribute-value-query behavior difference

2009-06-10 Thread Glidden, Douglass A
Danny, I executed both the cts:contains and the cts:search queries against the same data, these four documents that are in ML: * * * 10JUN2009 * 10JUN2009-0855 Here is the query I executed (with some XML to format the results ni

RE: [MarkLogic Dev General] element-value-queryvs.element-attribute-value-query behavior difference

2009-06-10 Thread Glidden, Douglass A
Danny, Well, I copied and pasted your query into CQ and got all true results, so apparently there's a configuration difference going on here. What's more distressing is that (with those docs in the DB so that they can be searched), running those four cts:contains calls returns (as before): true

RE: [MarkLogic Dev General] element-value-queryvs.element-attribute-value-query behavior difference

2009-06-10 Thread Glidden, Douglass A
Thanks for the reply, Geert. First of all, to answer your configuration questions, trailing wildcard searches and fast element trailing wildcard searches are enabled; trailing wildcard word position indexing is disabled. Now, to clarify the issue. A hyphen is considered a word boundary, hence s

[MarkLogic Dev General] element-value-query vs. element-attribute-value-query behavior difference

2009-06-10 Thread Glidden, Douglass A
Hi, I've run into an odd difference in the behavior of cts:element-attribute-value-query() as oppposed to cts:element-value-query(). (To tell the truth, neither one of them behaves exactly like I would prefer, but for now I'm just trying to figure out what is making the difference between them.)