Find Communities by: Category | Product

Arigato XML-san

May 2009 Previous month Next month

Ever since I have been working with XML, one use case always pops up: personalized books and magazines. In fact: the reason we built xDB was to facilitate the Build-Your-Own-Schoolbook idea of a Dutch educational publisher. The BYOS idea never materialized, mainly because at that time -late 90's- the business and technology weren't ready for it.


Now, in their struggle for survival, publishers are again exploring the personalization route. Take project Mine by publishing giant Time Inc. On Mine's website, you fill in a small questionnaire and select which five of a batch of Time Inc magazines you prefer. Based on this selection, Mine prints a personalized copy and sends it to you. I'm still waiting for my copy, but Joshua Benton from the Nieman Journalism Lab, received his copy and writes that the personalization is currently only done for the ads and that there are still some caveats.


Now, back to the technology side of the 'mass customization promise': can we deliver with the current set of XML tools and technology? Yes, we can! XML databases are available in many flavors (did you know that xDB is now available as a free download for development purposes?) and much has been
published about XQuery. Last, but not least, there is XProc, the XML Pipeline Language, which as Joel Amoussou points out "simplifies the design, documentation, and maintenance of very complex publishing workflows".


All these XML technologies (XML database, XQuery and XProc) have been packaged by EMC in a product called Dynamic Delivery Services, and to make it even better: within the next couple of weeks, DDS will be made available for free to the developer community! So: let the domain name bidding war begin for and!

You might not know it, but Google Docs latest enhancement, Insert Drawing, is actually a true XML gem as it uses the Scalable Vector Graphics (SVG) standard.


Wait... I can hear you think: is that standard still around? Sure, and Google Docs' adoption of it, might be the nudge forward it needs. Granted, there have been many SVG implementations and applications, but this is the first time a major party fully embraces SVG in a user-friendly way (there is nothing to install) while hiding its intrinsics (maybe you didn't know it was SVG until you read this blog).


For now, the SVG drawing function is available to Firefox and Opera users only (funny that Google did not include their own browser, Chrome, in the first batch), so what if I'm an IE-user? Well, go get Firefox! If you really insist on using IE then you'll have to do with VML, SVG's half-brother (half = pun intended).


Unfortunately, Google Docs currently does not export the drawing in SVG format. If you export the document, it will export the drawing as a PNG file. Hopefully this will change in a next revision. Because, let's face it, I'm a developer, not an artist, so I would like to load an SVG drawing into xDB and perform XQuery updates on them (circles1.svg, view as text):

let $new-circle :=
  <svg:circle cx="6.5cm" cy="2cm" r="100" style="fill:orange;

                            stroke:black; stroke-width:0.1cm" transform="translate(140,50)"/>
for $g in doc("/circles1.svg")//svg:g
  insert node $new-circle as last into $g

And voilá, there is your new orange circle:




That's it for now, I've got to do some drawings - domo arigato!