home
about
services
contact

Where am I?

XQuery is complicated

April 29, 2007 at 09:31 PM | categories: XQuery | View Comments

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?

Read and Post Comments
 

Location... Location? Location!

April 26, 2007 at 08:36 PM | categories: travel, MarkLogic | View Comments

Culture shock! I taught a developer class in NYC this week, near Wall St. This was my first trip since coming back from Thailand. Let's see... prices are about 100x higher, and I missed the upgrade on both legs. That's it - I'm goin' back to Thailand.

Oh wait - wasn't it 95-F and 100% humidity, there?

Anyway, I stayed around the Fulton Fish Market area. Too bad the market closed down about a year ago - but it still made a nice change from mid-town.

Brooklyn Bridge

Read and Post Comments
 

The last of the snow

April 12, 2007 at 08:50 PM | categories: travel | View Comments

I caught the last storm of the season, and went cross-country skiing.

Bear Valley

Read and Post Comments
 

Goodbye, Kilimanjaro

April 08, 2007 at 06:11 PM | categories: home | View Comments

Kilimanjaro died this morning at about 10:30. When I woke up she was vomiting up water, and then fresh blood. She couldn't stand up. I took her to the emergency clinic, where they diagnosed an intestinal tumor. Her appetite had been poor, and she'd lost about 30-50% of her former weight. On Tuesday, another vet had noticed the lump in her abdomen, but didn't see anything on the x-ray.

She seemed to recover interest in food whenever I had tuna sashimi to offer. She was always strong, and I had hoped it was something minor.

But it was serious. This morning at home, and In the emergency room, she was clearly in pain. It was time to say goodbye.

I seem to be saying goodbye a lot, lately.

kilimanjaro, 12 months ago

What would I have done if I'd known it was cancer, on Tuesday? Or a month ago? Cancer treatment for a 14-year-old cat? Would I have been strong enough to give her up while she still seemed to be healthy and happy? I wish I could have spared her the last hour or two. But I didn't know, and I couldn't.

ButI could edit this all night, without getting it right. So I'll stop.

Read and Post Comments