[Mono-devel-list] Managed XSLT release

Atsushi Eno ginga at kit.hi-ho.ne.jp
Thu Dec 25 01:20:38 EST 2003

Merry Christmas!

For all of you that are celebrating at this festive time, I hope that
you are waking up to find the presents you asked Santa for under your
tree and are enjoying these gifts.

However, you may have forgotten to look under another tree for gifts.
The CVS tree!

Right now, in CVS, the first release of Managed XSLT has been made.

What is Managed XSLT you ask? Once a long, long time ago (about one
yearish) there was a little boy. His name was Ben, he was 15 years old.
Ben was a Mono hacker. He had finished up optimizing BigInteger. The
class was fast as could be. The boy had tested his fixes, and had
installed RedHat Linux on his box for the first time so that he could
play around with his fixes. He began to go on IRC so he could talk to
True Hackers, like Miguel, Gonzalo, and Atsushi.

Once the BigInteger patches got checked in Ben started making small
patches. He would go into Bugzilla, looking for low hanging fruit.
However, this fruit was not good enough for him! He wanted meat! Ben
went off looking for meat that he could get. He searched, and searched,
and searched. Finally he came across the System.Xml namespace. The
plains of this unconquered tetoriy were vast, but beautiful. Ben had
heard of XML before, and played around with it a bit, but he was no
expert. He noticed that the XSLT implementation was using P/Invoke calls
to call an unmanaged library.

`That aint right!' said Ben.

So Ben went to talk to Miguel. Miguel said onto Ben:

`Ben, that is too big for you, you are not prepared to take on this sort
of task, it will take you two years'
`<miguel>	ben: you can use those spare cycles to write Gtk# docs ;-)'

Ben was not happy. He said:
`Bah, Humbug'

Ben went to talk to Atsushi. Atsushi loved the idea of a Managed XSLT
engine. Atsushi had coded some stubs, but they weren't much. Ben asked
Atsushi to send the stubs.

At this time, Ben went off to a Java Camp. Luckly, he brought his Linux
box with him, so he could always hack on Mono. Durring his free time, he
would hack on Managed XSLT. Ben refactored, Ben coded, Ben hacked. And
finally, on the last day of camp, Ben said:
<BenM> OMG!!!!!!!
<BenM> Managed XSLT just evaluated its first stylesheet

Ben was excited.

Everything becaome easy, most of the rest of XSLT was simple, now that
the framework was in place. Ben implemented most of XSLT before the end
of summer. He made the framework fast, sometimes faster than the C

Atsushi, having finished many other XML tasks, moved over to work full
time on XSLT. He made many bug fixes, for which Ben is thankful.

Okay, time to talk about technical aspects of managed XSLT.

* How to use?

If you want to use managed XSLT, don't worry. Next time you update
cvs, you will have managed XSLT by default. If you are already using
managed XSLT, you don't have to set MONO_MANAGED_XSLT environment
variable anymore.

Instead, if you want to use un-managed XSLT, from now on you will have
to specify MONO_UNMANAGED_XSLT environment variable.

* What managed XSLT _does_ have

- It can handle XPathNavigator directly. We don't have to write
temporary input document.

- It supports msxsl:script extension. When Managed XSLT found
<msxsl:script> element (where "msxsl" prefix is bound to
"urn:schemas-microsoft-com:xslt" just same as Microsoft.NET), it calls
mcs for C#, mbas for VB.NET, or mjs for JScript.NET (mjs is not in CVS
tree as yet) to compile them.

* What managed XSLT _doesn't_ have

- Performance. It is still nearly 2 times slower than MS.NET engine.
However, optimization work is ongoing.

- Libxslt has EXSLT support. But (at least currently) we don't have any.
If anyone plan to implement them, it would be very nice.

* Conformance

It passes most of OASIS XSLT Xalan testcases. Now, only 100 cases
remain, and in fact only nearly 40 cases matters.
Most of the cases that matters are:

  - xsl:decimal-format handling
  - duplicate or missing namespace declarations: mainly using
    document("") to include stylesheet
  - HTML indentation: those behavior depends on implementations

There are still some problems but I think most of them are not so major
problem. (for example, template conflict resolution fails on named
processing instruction... but how many times it will happen? ;-)

However, there are also Microsft Conformance tests in that suite. It has
its own output, which is different from what .NET implementation emits,
so I started from Xalan tests. MS tests will give another results.

* Examples

I made a quick example for

   - Use of XPathNavigator directly
   - msxml:script
   - Extension Objects (specifically, taking an XPathNodeIterator as an
argument, which we were not able to do before).

Ben put the archive here:

* People we would like to thank (especially):

Piers Haken, who implemented almost complete XPath engine.
Oleg Tkachenko, who implemented most of XSLT output work.
Joshua Tauberer, who had another implementation plan and provided his
own source to us.

Other than the names above, we have also great thanks to people who
helped us, including unmanaged XSLT contributors. And also thanks to
you, who are going to use it!

Love, love, love!
-- Ben and Atsushi

ps. This mail might be sent twice. Just ignore another one ;-)

More information about the Mono-devel-list mailing list