Redirecting responses from the rewriter in MarkLogic

Author: Dave Cassel  |  Category: Software Development

Update: I got some feedback on this post that amounted to “Wha???” Rereading it, I see that I really went into the esoteric for this one. After spending some time dealing with a very specific problem, I posted the solution, but it’s a problem you’re not very likely to encounter. If you do and you’re […]

The empty query

Author: Dave Cassel  |  Category: Software Development

A number of MarkLogic Server functions require a query as a parameter. Every now and then, however, you want to call one of those functions without specifying a query. There’s an easy way to handle this: you can use cts:and-query(()) as an empty query. This empty query matches everything, so it’s a simple way of […]

Gotcha – sequence index evaluation

Author: Dave Cassel  |  Category: Software Development

Every 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 […]

Adjacent Sibling Selectors and IE

Author: Dave Cassel  |  Category: Software Development

I came across an interesting little gotcha today while working with CSS’ adjacent sibling selectors. First, a quick intro, in case you’re not familiar with them. <div class=”content”> <h1>Big News</h1> <p>Intro paragraph.</p> <p>Meaningless drivel</p> </div> Sibling selectors let you apply styles to an element based on what it’s next to, rather than the usual way […]