Archive for the 'Mark Logic' Category
Friday, November 28th, 2008
Lately I’ve been playing with some more advanced XQuery. One thing nearly every XQuery engine supports is some kind of eval() function. MarkLogic has several, but my favorite is xdmp:eval. It’s lightweight because it reuses the entire calling context, so for instance you can write let $v := 5 return xdmp:value("$v"). Not too useful, but if the expression passed in comes from a variable, it gets interesting.
Now, quite a few standards based on XPath depend on the context node being set to some particular node. This turns out to be easy too, using the path operator: $context/xdmp:value($expr). According to the definition of the XPath path operator, the expression to the right is evaluated with the results of the expression on the left setting the context node.
OK, how about setting the context size and position? More difficult, but one could use a sequence on the left-hand side of the path operator, with the desired $context node in somewhere in the middle. Then last() will return the length of the sequence, and position() will return, well, the position of $context in the sequence. But it’s kind of hacky to manufacture a bunch of temporary nodes, only to throw them away in the next step of the path.
I’m curious if anyone else has done something similar. Comments? -m
Permalink
Filed under languages, Mark Logic, standards, XQuery
Tuesday, November 25th, 2008
Kurt Cagle has a thorough review of MarkLogic 4.0, worth a read itself. But check out the comments: one poster says he interviewed with the company and didn’t get reimbursed. The MarkLogic CEO responds personally with an offer to make it right. Why can’t more companies be like this? -m
Permalink
Filed under commercialism, Mark Logic
Thursday, September 25th, 2008
I’m working on a piece of software that, while not the answer to world peace, is still pretty neat and approaches a specific problem in a fresh way. The project is at the stage where it needs to get unveiled to early adopters in the target audience. So how does one introduce possibly unfamiliar concepts in the form of a new API?
The approach we ended up using for the initial documentation is essentially a narrative–telling a story. Narrative fills the gap between use case and solution in an engaging way. People are naturally inclined to listen to stories, and to expect certain story structures, such as having a beginning, middle, and end with suitable transitions. Thus, if the listener senses a gap in the story, it’s easy for them to speak up. When the story works, people find it easier to map their personal story on to the narrative, leading to better absorption of new concepts, and a more positive impression of the software.
And it’s working. So far we’ve gotten far more useful feedback than we would have otherwise. Even before showing others, the exercise of writing the narrative has exposed gaps and flaws in our thinking, leading to a better, more cohesive design.
If you think back about how you learned about, say, object oriented programming, or event-driven programming, likely there was a story or detailed use case involved that helped you get on board with a new way of thinking. Software + story: It’s a powerful combination, I recommend it.
BTW, my team is hiring full-time positions. Especially if you’ve got XML skills, you could be part of this team. Send me email if interested. -m
Permalink
Filed under Mark Logic, software, writing
Thursday, September 4th, 2008
The company is in great need of talented XML professionals, including sales engineers, consultants, support, and technical writing. Let me know if you (or someone you know) is up for the challenge. -m
Permalink
Filed under Mark Logic
Saturday, August 23rd, 2008
This post will be continuously updated to contain the most recent details about an XQuery 1.0 RDFa parser I wrote for Mark Logic. It follows the Functional RDFa pattern.
At present there is little to say, but eventually code and more will be available. Stay tuned.
-m
Permalink
Filed under announcement, browsers, Mark Logic, metadata
Monday, August 4th, 2008
Through the weekend I put most of the final touches on an implementation of RDFa in XQuery. The implementation is based on the functional specification of RDFa, an offshoot of the excellent work coming out of the W3C task force.
The spec contains a procedural description of the parsing algorithm, and several have successfully followed it to arrive at a conforming implementation. But you would have tough times explaining RDFa to someone that way. The functional description sort of fell out of the way I described RDFa to people.
“When you see an element with XXXX, you generate a triple, using SSSS as the subject, PPPP as the predicate, and OOOO as the object.”
Which arguably is the more natural way to express the algorithm for functional languages like XQuery or XSLT. Fill in the right blanks and you pretty much have it. In practice, it’s somewhat more complicated, but not nearly so much as with other W3C specs.
I hope to make the code available soon. You’ll hear about it first here.
I’ll write more when I’m not exhausted. :-) -m
Permalink
Filed under announcement, Mark Logic, metadata, XQuery
Friday, July 25th, 2008
In C, if you find yourself writing large switch statements (or rafts of if statements), you should consider using pointers to functions instead.
In C++, if you find yourself writing large switch statements (or rafts of if statements), you should consider using objects and polymorphism instead.
In XQuery, If you find yourself writing large typeswitch statements (or rafts of if statements), you should consider using _______________ instead.
Comment here. -m
Permalink
Filed under Mark Logic, patternalia, XQuery
Tuesday, July 22nd, 2008
This one’s internal. If you’re a Mark Logic employee, look me up. If not, well, expect things to be slow around here for a couple of days. -m
Permalink
Filed under Mark Logic
Wednesday, July 16th, 2008
Looks like a reasonably-sized revision. The first public working draft seems downright thin, in fact, relative to all the SHOULDs and MAYs in the requirements document. In particular, I’d like to see progress on 2.3.16 Higher order functions. (Then do we get a book XQuery: The Good Parts? …kidding..)
-m
Permalink
Filed under announcement, IPR, Mark Logic, XQuery
Thursday, June 12th, 2008
During a Q&A session today, I asked a panel of MarkLogic users about whether they saw metadata (and specifically RDF) as becoming an important factor in the near future. Fair enough question, having just come from the SearchMonkey project at Yahoo! The answer:
A qualified yes. Having a strong metadata store and query engine isn’t a crushing must-have-today need. But that day is coming… -m
Permalink
Filed under Mark Logic
Wednesday, June 11th, 2008
Other than training sessions today was the first day of the Mark Logic User Conference. And I was surprised by the feel of it: very much like a industry XML conference. Many familiar faces were there, like Norm, Zarella, Kurt, and Eliot. The sessions were somewhat more narrowly focused around MarkLogicy things, of course, but it still had that feel. I got alot out of the sessions I attended, and had great hallway conversations.
I’ll post more details when I’m not exhausted (which isn’t likely to be any time this week).
Things to check out: the tweets, the liveblog, and don’t miss the CEO blog (don’t worry, he’s a math/physics guy. It’s worth reading.)-m
Permalink
Filed under Mark Logic
Tuesday, June 10th, 2008
I’ll be up in San Francisco the rest of this week at the Mark Logic User Conference. If you’ll be there too, be sure to look me up. -m
Permalink
Filed under announcement, Mark Logic
Wednesday, May 28th, 2008
A very short rant on the state of XQuery tutorial materials on the web (not naming any names or linking any links).
I get it. Thank you for your fanatical emphasis on FLWOR constructs, but there is much more to it than that.
A few introductory sources don’t fall in to this trap, though. Mike Kay’s stuff. Priscilla Walmsley’s O’Reilly book for another. I’m pretty much finishing up reading it so I’ll review it here soon. -m
Permalink
Filed under Mark Logic, writing, XQuery
Thursday, May 22nd, 2008
I just found out about a nice little XForms engine called Ubiquity. (Having dinner with Mark Birbeck, TV Raman, and Leigh Klotz certainly helps one find out about such things) :-)
It’s a JavaScript implementation done right. Open source under the Apache 2.0 license. Seems like a nice fit with, oh maybe MarkLogic Server? -m
Permalink
Filed under browsers, Mark Logic, XForms
Wednesday, May 21st, 2008
If you are used to XSLT 1.0 and XForms, you see { $book/bk:title } and think nothing of it. XSLT 1.0 calls the curly-brace construct an Attribute Value Template, which is pretty descriptive of where it’s used. Always in an attribute, always converted into a string, even if you are actually pointing to an element.
In XQuery, though, the curly-brace construct can be used in many different places. Depending on the context, the above code might well insert a bk:title element into your output. The proper thing to do, of course, is { $book/bk:title/text() }. Many XSLT and XForms authors would omit the extra text() selector as superfluous, but in XQuery it matters.
What’s worse, depending on your browser, you might not see any output on the page within a <bk:title> element (or a title element of any namespace). Caveat browser! -m
-m
Permalink
Filed under annoyance, browsers, firefox, Mark Logic, XForms, xml, XQuery
Tuesday, May 20th, 2008
In my about page, I’ve written my CV in two lines. Why don’t you try it, then link back to here?
I’ve been known to use this as an interview question, and it’s quite a bit harder than it looks. A clever candidate will turn the paper sideways giving themselves more room to write “two lines”, but that’s not the point. This exercise forces one to really think about their qualifications, skills, and experience; one’s “unique selling proposition”.
Writing short, as opposed to rambling on, is notoriously difficult. Someone who can do that with their own CV is off to a good start in my book. -m
P. S. Mark Logic is looking for some high-caliber XML and web folks. Contact me offline if you know anyone looking…
Permalink
Filed under announcement, languages, Mark Logic, writing
Sunday, May 18th, 2008
You probably noticed the byline on my recent Yahoo! developer network posting. It, and a few more posts still in the pipe, list me as a “SearchMonkey Team Alumnus”. So yeah, it’s official, I’ve hung up my exclamation point and moved on to something else.
Specifically, Mark Logic, where a group of impressively talented people reside, recently including Norm Walsh. My first day there is tomorrow, so I don’t fully know what I’ll be working on, though it does involve
the core server, and taking it from it current state of awesome raw bare-metal power into something more akin to a application development platform.
Mark Logic strikes me like this: think back 10 years or so to all the hype and introductory articles around this new thing called XML–how it would enable whole new kinds of applications though the miraculous abilities of “markup” and perform realtime structured search over the results. It turns out that all these dreams were missing one critical piece, a way to do all the fancy indexing and repository management needed to make that happen. And the MarkLogic Server, to a very good approximation, IS that piece.
So what do I think of SearchMonkey at this point? No change, really. Good riddance to the ten-blue-links result pages. It’s breaking new ground in search, and Google will have a hard time stomaching an equally radical (and potentially revenue-impacting) change. SearchMonkey is really good news for the lowercase semantic web, including microformats and RDFa. It’s doing all the right things for the right reasons. The project will do fine without me. :-)
I had a good run at Yahoo! and I’m proud to have accomplished all I did there. Onward. -m
Permalink
Filed under announcement, Mark Logic, yahoo