People use things that work. And avoid things that don't.
My favorite example is the airport hand dryer. The promise of saving paper and improved hygene sounds good.
But the reality is that end up wiping your hands on your pants. And if there is any other option, you take it.
So imagine my surprise the other day in the jetBlue terminal as I walked up the dryer, hit the button and . . . in about 10 seconds a hypersonic blast of air totally dried my hands.
Hmm, something is afoot in the sanitaion industry.
And something is afoot in the XML world as well.
From the early days of SGML, markup languages have had a mix of specific, often free, tools and a few dedicated enterprise solutions. With XML the number possible XML solutions grew expoentially, but under the covers was often a patchwork of the same old tools tied onto existing technology.
The basic tasks of loading, querying and retieving XML might involve 3 or 4 separate bits working together - if it worked at all.
After that, using something like MarkLogic Server really dries your hands, if you know what I mean.
And it all comes down to XQuery being the cornerstone of a new era for XML.
It encompasses the ablity to get XML (like this example from the tutorial):
for $speech in //SPEECH[./SPEAKER eq "ORLANDO"]
return
$speech
And transform it:
for $speech in //SPEECH[./SPEAKER eq "ORLANDO"]
return
<bill-speech>
<said-by>{fn:string($speech/SPEAKER)}</said-by>
<in-play>{fn:string($speech/ancestor::PLAY/TITLE)}</in-play>
{fn:string-join($speech//LINE, '')}
</bill-speech>
But what really makes the XQuery work is working on the XML in one place. MarkLogic Server lets you do this in XQuery:
xdmp:document-load("c:/source/billsource/as_you.xml",
<options xmlns="xdmp:document-load">
<uri>/content/as_you.xml</uri>
</options>
)
When a load completes, the XML is ready to use. Just like that.
You can execute any XQuery using any element in the content right away.
So stop wiping your hands on your pants . . . and start using MarkLogic Server to handle XML.
And unlike the dryer, which you may be lucky enough to encounter as alert washroom suppliers pick up on the new trend, you can just download MarkLogic Server to experience XML that works.
MT
*Document-load is a MarkLogic Server extension to XQuery (anticipating the addition of update to the spec). This very flexible tool can take a filesystem argument or an HTTP address (try it with one of these plays http://www.ibiblio.org/xml/examples/shakespeare/)
Comments