Book: "Pentaho Kettle Solutions", Matt Casters, Roland Bouman, & Jos van Dongen, Wiley 2010 Book: "Pentaho Solutions", Roland Bouman & Jos van Dongen, Wiley 2009

Thursday, May 18, 2006

Got to get Organazized

Hola,

I really got to get organized. There's just too much little things that seem to remain unfinished for...well, like forever. So, I'm pushing some of the nearly finished or at least usable stuff to the web. Maybe someone else might benefit, and maybe I'll get the kind of feedback that will take it to the next level.


Organization Charts


Since a couple of days, I've been developing a javascript library to render Organization Charts on web pages. Dude, it's even documented... The good news is that it renders decent on Mozilla/Firefox and Internet Explorer. The bad news is that Opera seems to have a little bug or quirk that messes up the connecting lines. (Details: see my post at the opera forum)

MySQL information schema XML dump utilities


A little while ago, I blogged about some utilities I made to work with XML generated by the MySQL command line client, and I announced that I was working on an XSLT stylesheet to transform the information_schema XML to HTML documentation. Well, it's not finished, but you can get a feel of what I have in mind. And...there's notes too on how to use it. Check out this sample of generated documentation for the sakila (08) database. (BTW, check out the wiki on MySQLForge on that; Excellent, thanks Sheeri!)

Some MySQL UDF's for generating XML


Although the MySQL command line client can generate XML, it's not very flexible. The format is also non-standard (according to ISO 9075:2003, book 14). Well, I've started work on this, but it's all experimental. I'll post back on that when I can put it out in the open. What I've got working so far, is this happy little xml_attributes() function. It accepts a variable number of expressions, and automagically creates an XML attribute for them. Just as an example:

SELECT xml_attributes(
film_id
, title
, rating
)
FROM sakila.film
WHERE title LIKE 'AC%'
;
+--------------------------------------------------+
| xml_attributes(film_id,title,rating) |
+--------------------------------------------------+
| film_id="1" title="ACADEMY DINOSAUR" rating="PG" |
| film_id="2" title="ACE GOLDFINGER" rating="G" |
+--------------------------------------------------+

The funny thing is of course that you don't have to pass a name and a value; it figures it out by itself. You can pass as many expressions as you like, and it will do the job. Of course, I automatically generate proper XML names for the attributes, and alsoe the values are escaped properly. However the drawback of UDF's remains the fact that you *cannot* do anyting with character sets, wich pretty much makes them automatically unsuitable to deliver a true standards compliant XML generator.

A XML - database import facility based on annotated schemas

I've been thinking about this for some time. It should be possible to use XSLT to transform an XML Schema that contains relational mappings (as annotations) to a SAX-parser that actually reads an XML stream and imports the data in the process.

2 comments:

Pierre said...

Thank you very much.
Your organisation chart tool is exactly what I was looking for.

Roland Bouman said...

Hi Pierre

glad you like it! Feel free to write me about any issues you are having (bugs, usability, license)

kind regards