Archive for the ‘XQuery’ Category

MarkLogic Server 4.1-1

Thursday, June 25th, 2009

Get it here.

Profiling – the good kind

Tuesday, June 5th, 2007

The latest release of cq is 3.2.2. This XQuery tool now includes support for XQuery profiling, using the new profiling API, so MarkLogic Server 3.2 is required. The profiler has already been extremely useful: so far, we’ve used it in several projects where we’ve improved performance by 3-10x. Each project has been finished in a week or less.

XQuery is complicated

Sunday, April 29th, 2007

It’s a rare week when I don’t discover some new corner of the language that I didn’t know about before. Did you know about per-variable typing?


let $a as xs:integer := 1
return $a + 2


=> 3

Sounds useless, doesn’t it? But just like function-parameter typing, it could prevent errors. Think about this:


let $a as element(ArticleTitle) :=
  doc($ID)/MedlineCitation/Article/ArticleTitle
return $a

Now we have a guarantee that there will be exactly one ArticleTitle. Anything else will cause an error:

XDMP-AS: let $a as element(ArticleTitle) :=
  doc($ID)/child::MedlineCitation/child::Article/child::ArticleTitle
  return $a -- Invalid coercion: () as element(ArticleTitle)

Nice, isn’t it?

NYC Developer Training

Thursday, February 1st, 2007

I’m in NYC, teaching a developer course. There’s a little bit of snow on the ground, and everyone wants me to drink stout.

NYC

Querying XML: the book plug

Friday, January 19th, 2007

Stephen has written a book on XQuery. Unfortunately, I haven’t read it yet.