Re: [MarkLogic Dev General] Error in saving a converted PDF file

2007-05-03 Thread Michael Blakeley
Vikas, It sounds like you're trying to rebuild functionality that already exists in the Content Processing Framework (CPF). Why don't you simply set up CPF (per the docs), then call xdmp:document-load() with the path to your PDF? If you set up CPF correctly, a set of triggers will do the

Re: [MarkLogic Dev General] Query weights

2007-05-03 Thread Michael Blakeley
Peter, Have you read chapter 23 of the Developers' Guide? It is available at http://developer.marklogic.com/pubs - section 23.1 talks about the calculation that we perform for cts:score(). I think the interesting point for your question is that scores are calculated based on inverse

Re: [MarkLogic Dev General] Result set size and performance

2007-06-20 Thread Michael Blakeley
Patrick, I'd suggest that you step back from the query, and tell us about the task you are trying to solve. Perhaps a different query will be more suitable to the task. -- Mike Patrick Force wrote: We are attempting to deal with issues in result set sizes, timeouts, and performance in

Re: [MarkLogic Dev General] Question about Locks

2007-06-21 Thread Michael Blakeley
Bilal, I can release locks without a problem. (: Q1 :) doc('test.xml') = xa id=1//x (: Q2 :) xdmp:lock-acquire( test.xml, exclusive, 0, document being updated, xs:unsignedLong(600)) = () (: Q3 :) xdmp:lock-release('test.xml') = () Perhaps you are trying to acquire and release the same

Re: [MarkLogic Dev General] CQ Versioning and Bugginess

2007-06-27 Thread Michael Blakeley
John, That error is certainly a bug in cq, but it's easy to work around. The problem is that cq isn't very smart about app-server root paths, and is looking in the wrong place for the module that you're trying to import. To work around the issue, change your http or xdbc module location from

Re: [MarkLogic Dev General] CQ Versioning and Bugginess

2007-06-27 Thread Michael Blakeley
Per http://developer.marklogic.com/code/ Supported browsers are Mozilla 1.0+ and Internet Explorer 6.0+. Some features may not work on other browsers. The buffer list counts as a feature. It's open source, so why not help out? I've accepted a couple of patches for Opera. If you have a patch

Re: [MarkLogic Dev General] textarea closing missing

2007-07-13 Thread Michael Blakeley
Paul, The xmlspace declaration should help: declare xmlspace = preserve textarea /textarea = textarea /textarea -- Mike Williams, Paul wrote: We recently updated to MLS 3.2 and discovered that some HTML being generated for a form is no longer correct. The form uses an empty TEXTAREA

Re: [MarkLogic Dev General] textarea closing missing

2007-07-13 Thread Michael Blakeley
] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Blakeley Sent: Friday, July 13, 2007 12:42 PM To: General Mark Logic Developer Discussion Subject: Re: [MarkLogic Dev General] textarea closing missing Paul, The xmlspace declaration should help: declare xmlspace = preserve textarea /textarea

Re: [MarkLogic Dev General] textarea closing missing

2007-07-13 Thread Michael Blakeley
Paul, Both forms work for me, using IE 6.0.2800.1106. That is, I see an empty textarea on the resulting page. -- Mike Williams, Paul wrote: For example, this seems to work for me, in IE6: html xmlns=http://www.w3.org/1999/xhtml; body textarea/textarea /body /html That's because that is

Re: [MarkLogic Dev General] textarea closing missing

2007-07-16 Thread Michael Blakeley
[Land] (402) 592-8218 [Air](402) 203-2232 -Original Message- From: [EMAIL PROTECTED] [mailto:general- [EMAIL PROTECTED] On Behalf Of Michael Blakeley Sent: Friday, July 13, 2007 5:50 PM To: General Mark Logic Developer Discussion Subject: Re: [MarkLogic Dev General] textarea closing

Re: [MarkLogic Dev General] query

2007-07-20 Thread Michael Blakeley
See http://developer.marklogic.com/pubs/3.2/apidocs/Extension.html#directory -- Mike Kalidasu Surada wrote: Hi, I am getting list of document residing in a database through this query for $i in input() return document-uri($i) but wht the thing this i want to get the documents from

Re: [MarkLogic Dev General] XQSync Error

2007-07-23 Thread Michael Blakeley
Patrick, There isn't enough info for me to suggest anything. Please provide the entire XQSync log output, and all of your property settings. thanks, -- Mike Patrick Force wrote: Was wondering if anyone could help with this. I'm getting the following error when running XQSync: INFO: input

Re: [MarkLogic Dev General] Re: XQSync Error

2007-07-24 Thread Michael Blakeley
Patrick, Thanks - I've reproduced this problem, and I'll pursue a fix. Meanwhile, there's an easy workaround: make sure there are no underscore characters in the hostname portion of your connection string. -- Mike Patrick Force wrote: Here's the full command and console output: java

Re: [MarkLogic Dev General] Re: XQSync Error

2007-07-24 Thread Michael Blakeley
/view_bug.do?bug_id=6553128 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5049974 -- Mike Michael Blakeley wrote: Patrick, Thanks - I've reproduced this problem, and I'll pursue a fix. Meanwhile, there's an easy workaround: make sure there are no underscore characters in the hostname

Re: [MarkLogic Dev General] Taming xdmp:eval() syntax

2007-07-24 Thread Michael Blakeley
2007, Michael Blakeley wrote: If I can hijack this conversation for a word or two on external variables External variables are even lazier than string concatenation is. When you use an external variable, you protect your code from injection attacks, and you also avoid having to escape

Re: [MarkLogic Dev General] uuid implementation in Xquery

2007-08-14 Thread Michael Blakeley
), random-hex(4), random-hex(4), random-hex(4), random-hex(12) ), - ) } (: Query :) generate-uuid-v4() Best Tim Finney UVa Press On Fri, 2007-08-10 at 16:01 -0700, Michael Blakeley wrote: I happen to have one in front of me right now. Note

Re: [MarkLogic Dev General] xhtml loading question

2007-08-14 Thread Michael Blakeley
Namespaces? Try: namespace-uri(doc(/SFI/Update/news/articletest2/test.xml)/*) -- Mike Alex Rice wrote: Greetings, I have MarkLogic 3.2 and I am attempting to load some XHTML documents into the database. I have loaded some test documents them via the webdav interface from Windows XP. So

Re: [MarkLogic Dev General] XPP3

2007-08-22 Thread Michael Blakeley
Shannon Shiflett wrote: I'm setting up RecordLoader using Michael Blakeley's instructions (http://developer.marklogic.com/howto/tutorials/2006-06- recordloader.xqy) was hoping someone might verify that 1.1.4c is the latest greatest (most important, the correct) version of XPP3 -- the

Re: [MarkLogic Dev General] 3.2 documentation for cts:element-value-query

2007-09-05 Thread Michael Blakeley
Peter, That seems to be a typo in the docs. The correct option seems to be descendant-or-self. cts:element-value-query(xs:QName('p'), 'cat', 'descendant-or-self') = cts:element-value-query(xs:QName(p), cat, (descendant-or-self,lang=en), 1) -- Mike Peter Hickman wrote: According to the 3.2

Re: [MarkLogic Dev General] Resolving role IDs from a role ID

2007-09-20 Thread Michael Blakeley
Jacob Meushaw wrote: I'm sure there is an easy solution to this. I'm trying to learn more about security. I've used xdmp:document-get-permission() to retrieve the persmissions assigned to a given document. The results of this query give me something like: sec:permission

Re: [MarkLogic Dev General] order by with element range index throw XDMP-EXPNTREECACHEFULL

2008-02-22 Thread Michael Blakeley
On 22/2/08 13:24, Michael Blakeley [EMAIL PROTECTED] wrote: Bruno, Your query looks fine to me, and the query-trace indicates that the server is using your range-index for the sort. What version of MarkLogic Server are you using, and how large is your expanded-tree-cache? I'm able to perform a very

Re: [MarkLogic Dev General] Creating text files

2008-02-29 Thread Michael Blakeley
Paul, text { $css-content } will build a text node from your string (or from any sequence - very useful). -- Mike [EMAIL PROTECTED] wrote: I'm planning on creating a page on our site where users can alter certain styles defined in a personal CSS file. I'm hoping I can create such a CSS

Re: [MarkLogic Dev General] Trailing Spaces Removed from Attribute Values--Bug or Feature?

2008-03-12 Thread Michael Blakeley
I can't speak to the product issue, but is it practical to work around this behavior by ending your class attributes with a dummy character? For example: topic class=- topic/topic task/task -/ /self::*[contains(@class, ' topic/topic ')] = true DITA attaches meaning to the leading '-'

Re: [MarkLogic Dev General] warming indexes

2008-03-28 Thread Michael Blakeley
Alan, I can think of two possibilities that you might want to explore: a) In between searches, documents are being inserted or updated. These changes can invalidate existing cache entries, so that a new query will have to update the cache entries. This would mean that the cluster isn't

Re: [MarkLogic Dev General] document format

2008-03-31 Thread Michael Blakeley
Yes, that's correct. Here's another take on the XQuery: let $doc := doc($uri) return if ($doc/binary()) then 'binary' else if (doc/node() instance of text()) then 'text' else 'xml' Note that this test will treat empty documents (ie, uri does not exist) as xml. You could test for that

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

2008-04-10 Thread Michael Blakeley
Mattio, Not sure if it helps, but you could consider permanently boosting the quality of biographies, via xdmp:set-document-quality() or a related function. If I understand what you're trying to do correctly, you could also make your query test for a matrix of possibilities at runtime. You

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

2008-04-11 Thread Michael Blakeley
that the second leaf in each is there a placeholder of sorts ... something that just enables us to call out the hit on the attribute? On Thu, Apr 10, 2008 at 4:19 PM, Michael Blakeley [EMAIL PROTECTED] wrote: Mattio, Not sure if it helps, but you could consider permanently boosting the quality

Re: [MarkLogic Dev General] collection footprint

2008-04-24 Thread Michael Blakeley
Shannon, Each collection will add one extra term in your query, so a single collection is more efficient. But the difference may not be perceptible to your users. -- Mike Shannon Scott Shiflett wrote: Hi, If we have logically organized documents loaded into say 8 collections, to search

Re: [MarkLogic Dev General] specifying modules location in invoke

2008-05-08 Thread Michael Blakeley
The filesystem is used when the modules value is 0. -- Mike Mike Sokolov wrote: xdmp:invoke accepts an option to specify the modules database and the root path for modules. Is it possible to specify that modules are to be loaded from the file system using this option, or in some other way at

Re: [MarkLogic Dev General] order modifier

2008-05-21 Thread Michael Blakeley
This is one of the uglier warts in XQuery. http://www.w3.org/TR/xquery/#id-flwor-expressions and http://www.w3.org/TR/xquery/#prod-xquery-OrderModifier specify that OrderModifier is a literal token, not a variable or an expression. So it's tricky to write dynamic sorts. But here is one

Re: [MarkLogic Dev General] Loading a document through XCC with the Content object

2008-06-30 Thread Michael Blakeley
Mattio, I don't know much about C#, but I do know that the node-kind code in cq isn't 100% reliable, especially if you're using an older release of cq. Multiple nodes at the root level can produce misleading cq listings. Try this: for $i in doc('/product/633504414890149643.xml')/node()

Re: [MarkLogic Dev General] Loading a document through XCC with the Content object

2008-06-30 Thread Michael Blakeley
about? I checked the XML file being loaded through XCC and there doesn't seem to be anything unusual about it. On 6/30/08, Michael Blakeley [EMAIL PROTECTED] wrote: Mattio, I don't know much about C#, but I do know that the node-kind code in cq isn't 100% reliable, especially if you're using

Re: [MarkLogic Dev General] lib-search, Fields, andcts:field-word-query

2008-07-11 Thread Michael Blakeley
Fields (in the field-word-query sense) don't relate to the indexes used for element-query. As the admin guide puts it, You can use fields to create portions of the content that you might want to query as a single unit. That phrase single unit is key: fields are flat buckets of words, and do

Re: [MarkLogic Dev General] Unicode flattening for non combinedcharacters.

2008-07-21 Thread Michael Blakeley
The fn:translate() function would probably be more efficient than using fn:contains() and fn:replace(). It can also be more easily extended to handle more than one conversion. ... return translate(ØŁé, OLe) -- Mike Danny Sokolsky wrote: Hi Peter, I can think of a few ways to do this.

Re: [MarkLogic Dev General] What could be the reason that a forest goesdown?

2008-07-23 Thread Michael Blakeley
Isha, Perhaps you are, as the message suggested, out of disk space? From your web site, I see that MPS Technologies is a provider of technology services for the information industry. I think you would be well-served by attending our 3-day developer course

[MarkLogic Dev General] cq 3.2.4

2008-07-23 Thread Michael Blakeley
I am pleased to announce that cq 3.2.4 is now available. This release includes fixes for various minor bugs, and improves compatibility with current and future releases of MarkLogic Server. If you are using cq and MarkLogic Server 3.2-1 or later, I hope that you will find this upgrade

Re: [MarkLogic Dev General] setting tree cache partitions?

2008-07-29 Thread Michael Blakeley
David Sewell wrote: In the MarkLogic admin console, Groups configure panel, what is the effect of increasing the default number of partitions (1) for any of the caches (list, compressed tree, expanded tree)? It's not documented in the Admin docs. David, The admin guide does describe the

Re: [MarkLogic Dev General] setting tree cache partitions?

2008-07-29 Thread Michael Blakeley
Michael Blakeley wrote: David Sewell wrote: In the MarkLogic admin console, Groups configure panel, what is the effect of increasing the default number of partitions (1) for any of the caches (list, compressed tree, expanded tree)? It's not documented in the Admin docs. David, The admin

Re: [MarkLogic Dev General] DELETE method not allowed on HTTP Server?

2008-08-01 Thread Michael Blakeley
Steve, The misleading error message for DELETE with application-level authentication is a bug, and I understand that a fix is in the works for a future release. As you found, switching to HTTP authentication results in the correct error message (405). There is an open RFE for HTTPServer

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

2008-08-12 Thread Michael Blakeley
Darren, I don't think anyone pointed out the reason for XDMP-NOTANODE: I think there's a misplaced parenthesis in your query. Instead of: xdmp:describe( (collection(MDC))[1] )/node() ...you probably wanted: xdmp:describe( collection(MDC)[1]/node() ) The first form gets the child

Re: [MarkLogic Dev General] recordloader and XML_REPAIR_OPTION

2008-08-20 Thread Michael Blakeley
Alan, I would expect your use-case to work, as long as RecordLoader is in ID_NAME=#FILENAME mode (which is the default). I tried to create a test case following your report, but I can't reproduce the problem. Maybe you can tell me what differs between our inputs or configurations? Are you

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

2008-08-20 Thread Michael Blakeley
Try cts:tokenize() instead of fn:tokenize. Rather than using regex, this splits text up into cts:word, cts:punctuation, and cts:whitespace items. For example let $n := pa b c d e f g h i j k/p let $q := 'f' let $words-before := 3 let $words-after := 3 return cts:highlight( $n, $q,

Re: [MarkLogic Dev General] Quirks of generating xhtml with xquery

2008-08-28 Thread Michael Blakeley
Sorry, Eric: that's XQuery 1.0 syntax vs MarkLogic syntax. I've been trying to learn 1.0 syntax. Apparently I've succeeded - but as already mentioned on this list, we should be using the MarkLogic syntax (aka draft 2005-03, aka 0.9-ml) for now. -- Mike Eric Palmitesta wrote: Firstly, there

Re: [MarkLogic Dev General] Quirks of generating xhtml with xquery

2008-08-28 Thread Michael Blakeley
the great responses, everyone, you've given me much to read (on the mailing list and external links). Much appreciated! Eric Michael Blakeley wrote: Eric, I think it's important to distinguish between server behavior and browser behavior. While we can use XQuery to generate valid XHTML

Re: Recursive descent: typeswitch v. XSL's apply-templates ( xsl:template/@match), was Re: [MarkLogic Dev General] Quirks of generating xhtml with xquery

2008-08-28 Thread Michael Blakeley
Those are good points. I generally use XQuery as a code generator to write a skeleton module for large transform libraries (schema migration, for example). That reduces the burden of starting a project, and gets me to the easier to maintain state more quickly. Here's an example: this one

Re: [MarkLogic Dev General] Repair XML Content

2008-09-05 Thread Michael Blakeley
http://www.google.com/search?q=site%3Adeveloper.marklogic.com+repair returns quite a few hits. The dev guide (http://developer.marklogic.com/pubs/3.2/books/dev_guide.pdf) is a good place to start - from Chapter 10: MarkLogic Server includes the ability to correct content that is not

Re: [MarkLogic Dev General] XQSync problem

2008-09-09 Thread Michael Blakeley
David, This looks like a bug in XQSync, which also affected INPUT_COLLECTION_URI. Thanks for reporting it. I've checked in a new jar which fixes the problem: svn revision 876, version 2008-09-09.1 -- Mike David Sewell wrote: I've been testing XQSync:

Re: [MarkLogic Dev General] Inserting content - preferred way?

2008-09-21 Thread Michael Blakeley
Changing APIs may not get you anywhere: I can match your ingestion rate on my laptop, using either API. Start by analyzing the performance of every subsystem, so that you know where the bottleneck is. Measure the utilization of the client CPU, server CPU, disk, and network. If the subsystems

Re: [MarkLogic Dev General] Attribute insertion using node-insert-child

2008-09-21 Thread Michael Blakeley
Eric, I think you'll find that it's pretty fast, as long as the tree structure fits in L2 cache. The profiler API is documented at http://developer.marklogic.com/pubs/3.2/apidocs/ProfileBuiltins.html#allowed - but it's best used via a tool. The current release of cq

Re: [MarkLogic Dev General] CORB: Sleep during configurable hours and process 1 forest at a time

2008-09-23 Thread Michael Blakeley
Brent, Those are interesting ideas: I'll add them to my list of potential enhancements to Corb. The Corb source code is fairly simple, and I welcome patches. Meanwhile, you can implement something like that per-Forest idea without changing any Java code: just provide your own uris-module,

[MarkLogic Dev General] cq 4.0.1

2008-09-24 Thread Michael Blakeley
On the heels of the MarkLogic Server 4.0-1 release, I am pleased to announce that cq 4.0.1 is now available at http://developer.marklogic.com/svn/cq/releases/mark-logic-cq-4.0.1.zip While cq 3.2.4 is compatible with MarkLogic Server 4.0-1, this release adds new features to take advantage of

Re: [MarkLogic Dev General] CQ v4.0.1 Error. Occurs when pushing the explore link.

2008-09-25 Thread Michael Blakeley
... Thanks, Wyatt Michael Blakeley wrote: Mike, Thanks for the report. I'm having trouble reproducing this error on Linux: that may mean that it's a Windows-specific error, so I'll have to try a Windows machine. Meanwhile, you should be able to cq 3.2.4 with MarkLogic Server 4.0-1. -- Mike Mike

Re: [MarkLogic Dev General] restructuring to avoid undetectable deadlocks

2008-09-25 Thread Michael Blakeley
Mark, The best solution is to think about the problem as a single transaction: don't attempt to emulate dirty reads. In the developer training, we talk about this issue when discussing updates, and show its use in the implementation of a persistent FIFO queue. Untested code... let $doc-root

Re: [MarkLogic Dev General] Preserving whitespace in attributes

2008-09-26 Thread Michael Blakeley
Geert, I tried your test case with 4.0-1 (and cq 4.0-1.1) on linux x86_64. The whitespace was not trimmed, irrespective of the xmlspace setting, and the result was: test att=bla bla att2=bla2 bla2 / -- Mike Geert Josten wrote: Hi all, I have what seems to me a simple question: how

Re: [MarkLogic Dev General] namespace problem

2008-09-26 Thread Michael Blakeley
Mindie, I'd avoid setting the default element namespace in a prolog, like that. Instead, try something like this (porting to xquery 0.9-ml is left as an exercise): xquery version 1.0-ml; declare variable $METADATA as element() := metatitlethis is the title/title/meta ; declare function

Re: [MarkLogic Dev General] namespace problem

2008-09-29 Thread Michael Blakeley
Of Michael Blakeley Sent: Friday, September 26, 2008 4:13 PM To: General Mark Logic Developer Discussion Subject: Re: [MarkLogic Dev General] namespace problem Mindie, I'd avoid setting the default element namespace in a prolog, like that. Instead, try something like this (porting to xquery 0.9-ml

Re: [MarkLogic Dev General] RE: mark logic handling of Authorization header

2008-09-30 Thread Michael Blakeley
Mark, As I understand it, you are asking for a guarantee of product behavior that is not specified in existing product documentation. I could write you a simple test to show that a server with application-level authentication still processes the Authorization header for

Re: [MarkLogic Dev General] lib-parser

2008-10-08 Thread Michael Blakeley
Today, lib-parser calls cts:tokenize() without the language argument, so it always uses the database default language. So the tokenization is language-aware, but there's no per-query control over which language it uses. If per-query control over language awareness would be useful, how would

Re: [MarkLogic Dev General] xpath string construction

2008-10-14 Thread Michael Blakeley
a fixed length). This approach would preserve the scalability of random ids, without requiring extra work to check any but the first id. -- Mike Eric Palmitesta wrote: Wow, thanks for the reply, Michael. I'll probably be using some variation of one of your examples. Michael Blakeley wrote

Re: [MarkLogic Dev General] unique ids

2008-10-14 Thread Michael Blakeley
Paul, Yes, you can increment a sequence document by more than 1, to mimic sequence reservations. But to get any performance benefit, won't you also have to maintain a list of reserved, but unused, sequence numbers? Perhaps you'd do so in your application layer, where you'll also have to

Re: [MarkLogic Dev General] xpath string construction

2008-10-15 Thread Michael Blakeley
with another sub-id, I hadn't thought of something like this. I appreciate the debate, it's a quick way to learn. :) Much thanks, Eric Michael Blakeley wrote: Eric, I don't understand why you say that random ids don't scale well. I'd argue that sequential ids don't scale at all

Re: [MarkLogic Dev General] CQ v4.0-1.1 - Explore link does not work when user accessing CQ has the minimum required permissions

2008-10-27 Thread Michael Blakeley
Mike, Thanks for the report: that's a bug in cq, and I'll add a check for the missing privileges in the next release. Meanwhile you can simply add them to the role you're using for cq (I usually create a 'cq' role, and grant it all the necessary privileges). The extra privileges are:

Re: [MarkLogic Dev General] How to use cts:search to query documents and their properties?

2008-10-28 Thread Michael Blakeley
Bindu, This might be a good time to ask whether properties are the right implementation for your metadata. The important feature of properties is that they are *not* part of the document. This separation has certain benefits, but if you want to search for two facts together, then properties

Re: [MarkLogic Dev General] sessions disabled in CQ for Marklogic 4.0

2008-10-28 Thread Michael Blakeley
Cathy, Thanks for the report. I'm having trouble reproducing the error, though. As I see it, this test case ought to be equivalent: import module namespace cxq=com.marklogic.developer.cq.xquery at 'cq/lib-xquery.xqy'; cxq:get-epoch-seconds(xs:dateTime(2008-10-28T15:42:45.600414-04:00)) =

Re: [MarkLogic Dev General] sessions disabled in CQ for Marklogic 4.0

2008-10-28 Thread Michael Blakeley
as you suggested but it did not help. Do you think that this is a 4.0 issue? If so, would CQ 3.2 work with M/L 4.0? On Oct 28, 2008, at 4:44 PM, Michael Blakeley wrote: Cathy, Thanks for the report. I'm having trouble reproducing the error, though. As I see it, this test case ought

Re: [MarkLogic Dev General] Improving Lookup Performance

2008-10-29 Thread Michael Blakeley
Steve, The third query is a fairly common case: you'll probably want to use a range-index and cts:element-values(). http://developer.marklogic.com/pubs/4.0/apidocs/Lexicons.html#cts:element-values The other two queries look to me like they should be able to make full use of the indexes.

Re: [MarkLogic Dev General] sessions disabled in CQ for Marklogic 4.0

2008-10-29 Thread Michael Blakeley
- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Blakeley Sent: Tuesday, October 28, 2008 5:57 PM To: General Mark Logic Developer Discussion Subject: Re: [MarkLogic Dev General] sessions disabled in CQ for Marklogic 4.0 Mike, Judging by the line numbers, I don't think you're

Re: [MarkLogic Dev General] DELETE method not allowed on HTTP Server?

2008-10-30 Thread Michael Blakeley
Steve Mallen wrote: Given this restriction, I will probably end up using Apache Tomcat or Jetty to intercept the requests, and make XDBC requests to Mark Logic from there. This will give me full URL mapping ability too. I wanted to follow up on this thread, because the 4.0-1 release has

Re: [MarkLogic Dev General] FATAL_ERRORS not working in record loader

2008-10-30 Thread Michael Blakeley
Cathy, Thanks for the report, but I can't reproduce this problem using version 2008-10-28.1. You've omitted the start of the output, where you should see the version number and other useful information: here's what mine looks like. RecordLoader starting, version 2008-10-28.1 on 1.6.0_0

Re: [MarkLogic Dev General] more record loader questions

2008-10-30 Thread Michael Blakeley
Alan Darnell wrote: Is there a way to send errors up from load.xqy and the modules it invokes to record_loader so that we can see what's happening in simplelogger.log? No, but you can call xdmp:log() in your module. I'd recommend logging the value of $URI. Then you can use grep on

Re: [MarkLogic Dev General] Locking documents

2008-11-05 Thread Michael Blakeley
Steve, If I understand your situation correctly, and if I understand chapter 3 of the Developers Guide correctly, the transaction model should lock the documents for you, and you shouldn't need anything extra. You might want to review that chapter to see how the transaction model works

Re: [MarkLogic Dev General] Embedding the selected attribute in an HTML select list with xquery

2008-11-11 Thread Michael Blakeley
Tim, This looks like a good time to use a computed constructor. ... option value=1{ if ($flag) then attribute selected { 1 } else () }Select one/option ... You could also write a function to create the option element with or without the attribute, but I think the computed constructor is

Re: [MarkLogic Dev General] Improving XPath Performance onSearchResults

2008-11-12 Thread Michael Blakeley
Actually that query does *not* require any special indexes. The server always indexes all XML element values and element-attribute values. You would only need an attribute range index for a fast order by on keyword/@value, or for a cts:attribute-value-range-query term, or for

Re: [MarkLogic Dev General] XML UTF-8 header output

2008-11-12 Thread Michael Blakeley
David, It's good to include error messages when a query isn't working. In this case the error message is: [1.0-ml] XDMP-ARGTYPE: (err:XPTY0004) xdmp:save(filename.xml, (?xml version=quot;1.0quot; encoding=quot;UTF-8quot; ?, something.../something)) -- arg2 is not of type node() That makes

Re: [MarkLogic Dev General] Improving XPathPerformance onSearchResults

2008-11-12 Thread Michael Blakeley
. Understanding how the functions relate to the indexes is probably one of areas I've found hardest with MarkLogic. Thanks Rob -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Blakeley Sent: 12 November 2008 16:55 To: General Mark Logic Developer

Re: [MarkLogic Dev General] Re: CQ 4.0-1.1 policy.xml

2008-11-12 Thread Michael Blakeley
Thanks for the report. I found the problem, and the fix is very simple. If you'd like to patch it before I release cq 4.0-2, you can edit cq/result.html and change prototype.js to js/prototype.js. -- Mike Hahn, Thomas A. (LNG-DAY) wrote: We are using IE 6.0.29x and FireFox 2.0.0.14-- they

Re: [MarkLogic Dev General] Improving XPathPerformance onSearchResults

2008-11-13 Thread Michael Blakeley
, $search)/@count return fn:sum($results) Running profiling on the query shows me that it's the XPath stuff I do on the search results that's holding everything up, can anyone advise how I can improve this? Thankl On Wed, Nov 12, 2008 at 7:24 PM, Michael Blakeley [EMAIL PROTECTED] wrote

Re: [MarkLogic Dev General] lib-search and collections

2008-11-21 Thread Michael Blakeley
Alan, I believe the import module declaration on line 1 is missing an at clause. This is legal XQuery, but its interpretation is implementation-defined. When the location is empty, as in this case, MarkLogic Server interprets the application server root as the module location. Since the

Re: [MarkLogic Dev General] adding to marklogic classpath

2008-12-01 Thread Michael Blakeley
Dave Pawson wrote: 2008/12/1 Michael Blakeley [EMAIL PROTECTED]: As the original exception suggested, Dave doesn't have the right xpp3 jar file. Or something is missing. Exception in thread main java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserException The xpp3_xpath jar isn't

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

2008-12-03 Thread Michael Blakeley
No, it means that the input encoding will not be detected automatically. From http://developer.marklogic.com/svn/recordloader/trunk/README.html: INPUT_ENCODING UTF-8 The Java Charset encoding (codepage) to use for all input XML. If unset, RecordLoader will use null, which will default to the

Re: [MarkLogic Dev General] HTTP access to database documents

2008-12-09 Thread Michael Blakeley
=file). Thanks for your suggestions. It sounds like your second idea (setting HTTP server parameters) might do it. Tim On Tue, 2008-12-09 at 17:27 -0800, Michael Blakeley wrote: Tim, I don't quite understand your question. Do you want fn:doc()? Or would you like HTTP clients to be able to request

Re: [MarkLogic Dev General] xdmp:directory-create() doesn't seem to work

2008-12-11 Thread Michael Blakeley
xdmp:directory-create() creates a directory in the current database. It may be that http://developer.marklogic.com/pubs/4.0/apidocs/UpdateBuiltins.html#xdmp:directory-create isn't clear enough about this. Perhaps you want

Re: [MarkLogic Dev General] lib-parse - how to search for boolean expressions within a field

2008-12-11 Thread Michael Blakeley
lib-parser tries to emulate google's syntax. It does not implement AUTHOR:(john AND smith) because that isn't google syntax. You are, of course, free to write your own parser, and you can even use the apache-licensed lib-parser.xqy code as a starting point. But first let's look into

Re: [MarkLogic Dev General] xdmp:directory-create() doesn't seem to work

2008-12-11 Thread Michael Blakeley
directory. (not create one) Is there a function to create a directory on the file system? Thanks David -Original Message- From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Michael Blakeley Sent: Thursday, December 11, 2008 9:45 AM

[MarkLogic Dev General] Re: General Digest, Vol 54, Issue 15

2008-12-11 Thread Michael Blakeley
Dave, One problem is that your expected output isn't a valid cts:query. cts:element-word-query(QName(AUTHOR), cts:and-query(cts:word-query(john), cts:word-query(smith))) = [1.0-ml] XDMP-TOOFEWARGS: (err:XPST0017) QName(AUTHOR) -- Too few args, expected 2 but got 1 It's relatively easy to

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

2008-12-18 Thread Michael Blakeley
I'd guess that notepad++ added a BOM to the beginning. If so, you'll have to get rid of it: perhaps you can configure notepad++ to be less helpful? http://www.google.com/search?hl=enq=%22notepad%2B%2B%22+without+bom had a few promising-looking links. -- Mike On 2008-12-18 10:00, Eric

Re: [MarkLogic Dev General] absolute path: xdmp:document-get vs xdmp:uri-is-file

2008-12-18 Thread Michael Blakeley
Yes, but you'd have to read each directory entry. I suspect that will take longer than xdmp:document-get would. Here's a solution based on document-get: declare function local:filesystem-is-available($path as xs:string) as xs:boolean { try { exists(xdmp:document-get($path)) } catch

[MarkLogic Dev General] cts:query to test language in context?

2008-12-22 Thread Michael Blakeley
At LDS last week, I noted that they use a publicationLanguage element, and tried to nudge them toward using xml:lang attributes instead. They have content in several languages, but have not yet installed any non-English license options. But I ran into a problem with cts:element-values(), for

[MarkLogic Dev General] please ignore [ was Re: cts:query to test language in context? ]

2008-12-22 Thread Michael Blakeley
Please ignore - my last message should not have gone to this list. -- Mike ___ General mailing list General@developer.marklogic.com http://xqzone.com/mailman/listinfo/general

Re: [MarkLogic Dev General] MarkLogic vs SQL Server search performance

2008-12-29 Thread Michael Blakeley
Grant, I strongly recommend pagination in your query: see http://developer.marklogic.com/howto/tutorials/2006-09-paginated-search.xqy As well as xdmp:query-meters(), you should consult xdmp:query-trace() - see http://developer.marklogic.com/pubs/4.0/books/performance.pdf Looking at the

Re: [MarkLogic Dev General] MarkLogic vs SQL Server search performance

2008-12-30 Thread Michael Blakeley
Grant, Your query-trace output looks normal to me. I didn't expect to see anything unusual there, but it's a good tool to know about. Your category display sounds similar to a feature called facets, or guided navigation. If so, you can avoid retrieving all the results. Try

Re: [MarkLogic Dev General] MarkLogic PDF content handling

2009-01-13 Thread Michael Blakeley
Sundeep, The error code XDMP-DOCUTF8SEQ suggests that MarkLogic Server sees the pdf document as text or XML, rather than binary. There are several ways to fix this, but in XCC I would specify that the content is binary. The XCC overview section at

Re: [MarkLogic Dev General] Rename a document

2009-01-13 Thread Michael Blakeley
Try this: xquery version 1.0-ml; declare function local:document-rename($uri as xs:string) as empty-sequence() { xdmp:document-delete($uri), let $permissions := xdmp:document-get-permissions($uri) let $collections := xdmp:document-get-collections($uri) let $quality :=

Re: [MarkLogic Dev General] MarkLogic PDF content handling

2009-01-13 Thread Michael Blakeley
Sundeep, Why not add the desired root element name to the cts:search call? For example, to restrict the search to the xhtml output: cts:search( xdmp:directory('/cpf/msword')/xh:html, $my-query )[$start to $stop] -- Mike On 2009-01-13 01:38, Sundeep_Raikhelkar wrote: 1.

Re: [MarkLogic Dev General] MarkLogic PDF content handling

2009-01-15 Thread Michael Blakeley
...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Michael Blakeley Sent: Tuesday, January 13, 2009 11:44 PM To: General Mark Logic Developer Discussion Subject: Re: [MarkLogic Dev General] MarkLogic PDF content handling Sundeep, The error code XDMP-DOCUTF8SEQ suggests

Re: [MarkLogic Dev General] MarkLogic PDF content handling

2009-01-16 Thread Michael Blakeley
this binary, restarted server and it worked. Thanks again. Regards, Sundeep -Original Message- From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Michael Blakeley Sent: Thursday, January 15, 2009 11:29 PM To: General Mark Logic

Re: [MarkLogic Dev General] Marklogic 4.0 Element-Range-Query

2009-01-16 Thread Michael Blakeley
Tony, The basic approach from your original email is reasonable, but you have asserted that the output was incorrect. I cannot reproduce this because your test case does not run (due to syntax errors). Even if I try to fix the syntax errors, I can't know whether or not I'm seeing the same

Re: [MarkLogic Dev General] lib-search and case-sensitivity for terms

2009-01-20 Thread Michael Blakeley
Bindu, That looks like a bug, but I think you have an older version of lib-parser.xqy. In the 2008-05-13 zip release (and in svn at http://developer.marklogic.com/svn/lib-search/trunk/release) I see this: ... define function lp:get-cts-query ($qs as xs:string?, $map as

Re: [MarkLogic Dev General] lib-search and case-sensitivity for terms

2009-01-20 Thread Michael Blakeley
comfortable that the release version in subversion will work correctly with ML 4 at this time? -- Bindu On Jan 20, 2009, at 10:16 AM, Michael Blakeley wrote: Bindu, That looks like a bug, but I think you have an older version of lib-parser.xqy. In the 2008-05-13 zip release (and in svn at http

Re: [MarkLogic Dev General] text output

2009-01-22 Thread Michael Blakeley
Jim, If a query returns text, it's text. You can set the content-type response header, if that helps. xquery version 1.0-ml; do we escape text output? 1 2 amp;amp; 2 1 I have to escape '' in the XQuery string, because of language requirements. But I don't see any escaping in the output.

  1   2   3   4   5   6   7   8   9   10   >