Writing an XSLT Optimizer in XSLT – Michael Kay


Ok, it is just cool to hear Michael Kay talk. But I forgot he is British…now I’ll have to listen more closely to cut through the accent. Damn my American-centric upbringing. 😉

XSLT is designed to transform trees, optimization is an exercise in transforming the expression tree, both are rule based, XSLT is clearly the ideal tool for the job.

Lots of laughs so he must be saying funny things…damn my lack of experience in these circles. I sure hope that changes this week.

Don’t try to do it all in one step…generate something that can be optimized more later. Good statement about pipelining.

This is REALLY deep stuff. I’ve never messed with creating an optimizer….it seems like something that I should understand is available…and how to use it but let others write the actual code. My major concern with it is validating that the output of the optimizer actually provides the same output as the input of the optimizer when run against the same input documents. But that has to be a concern of his so perhaps he’ll mention it soon.

What I am enjoying about the examples in his presentation (which are graphical and hopefully available in the paper) is that they are providing suggestions for originally writing the XSLT in the ‘optimized’ version. For example, instead of writing a set of ‘where’ statements with predecates I could use saxon:item-at. I have never used saxon:item-at so I will look into the properties of this element in the future.

When running the optimizer against a set of terms the Java optimizer was much better…although that might be because the XSLT optimizer was written in a day and the Java optimizer has 7 years of code behind it.

Does this matter? Mostly no but in some cases it matter incredibly. When running an XSLT stylesheet against 140k documents, as one of my clients does regularly, it could make a significant difference I think. But on repetitious small transforms it probably won’t matter.

Don’t worry, he isn’t going to change the Saxon parser to XSLT anytime soon. It is a research project, if you are interested in messing with it, drop him a line….wow is that beyond me. Can you imagine if he broke Saxon? Companies would collapse…civilization would come to a stop.

Oh, and make sure you go to the microphone…or Tommie may rip out your spine like Sub-Zero in Mortal Kombat. 😉

Explore posts in the same categories: extrememarkup, extrememarkup07

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: