In XQuery, I commonly find myself writing XPath statements to navigate into some block of XML to find some tasty nugget that’s in there somewhere. When doing so, I’ve found one particular aspect that frequently throws me off, getting me empty results instead of the information I wanted. Having finally figured it out, and after [...]
XPath: using the root element
August 31st, 2010Losing my senses
August 31st, 2010Today for a while I was without Internet access and I had this sensation I’ve noticed before, and mentioned to a few people: I’ve gotten to the point where being cut off from the Internet is like losing one of my senses. Not always… if I’m on a mountain trail somewhere, I’m not worried about [...]
Gotcha – sequence index evaluation
July 13th, 2010Every now and then I get caught by this little gotcha, so I figured I’d share and hopefully by writing about it, I’ll remember to do this right. Let’s start with a little something simple, shall we?
let $seq := (1 to 100)
return $seq[10]
Simple, as promised. I create a sequence of numbers from one to one [...]
Calling a function on all permutations of a sequence
May 20th, 2010A project I’m working on required me to call a function on each permutation of a sequence. I said to myself, “Surely, you can’t be the only person needing to do that in XQuery”. Having heard that from such a reliable source, I figured I should share.
(: Print an index and the selected members of [...]
Do it yourself
May 4th, 2010I have a little story to tell that I hope will inspire someone to pursue an entrepreneurial goal.
I came across a notebook recently. I don’t remember exactly when I used this one, but it was somewhere around ‘97 or ‘98. Back then, I was playing chess on a web site called ItsYourTurn.com. I loved the [...]
A RESTful chess service: part 5
May 3rd, 2010Welcome to part 5 of my series on designing a RESTful chess service. Don’t worry — today’s is the last of the planning posts, then we get to some code.
The last two steps laid out by the authors of RESTful Web Services are to consider the typical course of events and to consider error conditions. Let’s [...]
A RESTful chess service: part 4
April 26th, 2010This is part four in a series of posts walking through the process of building a RESTful chess service. I’ve been slacking off a bit in the pace of my posts, but hopefully that will pick back up — I have a bit more travel coming up, and evenings spent hanging out in hotel rooms [...]
A RESTful chess service: part 3
March 30th, 2010In part 2 of this series, I defined the data set and resources for my service. I’ve been following the procedure listed in RESTful Web Services for how to lay out the service. Here are those steps again:
Figure out the data set
Split the data set into resources
For each resource:
Name the resources with URIs
Expose a subset [...]
A RESTful chess service: part 2
February 21st, 2010In part 1 of this series, I laid out my goals for a RESTful chess service, based on the RESTful Web Services book from the O’Reilly series. The authors present a procedure for designing services, the first two of which are:
Figure out the data set
Split the data set into resources
The use cases I’m looking to [...]
A RESTful chess service: Part 1
February 15th, 2010I recently got a copy of RESTful Web Services, a book in the O’Reilly series that I read some time ago. I first read it when I was introduced to REST as an architectural style. It helped me get my head around a number of the concepts.
I decided that I want to refresh my memory [...]