03 October 2006

mono XslTransform vs .net XslTransform observation

Although by and large mono is the reincarnation of .net for the poor, there are subtle differences between them. Here is what I found on Xsl Transformation. Mono XML interprets xsl:last() function in a significant different way to native .net. XML.


Using the same xml style sheet with a few debug trace: p – xsl:position(); l – xsl:last; c-xsl:count()
Mono rendering:

Native .Net rendering:

And the source code:
We also found the insignificant whitespaces in the two versions are placed differently.

We are able to spot these difference in a consistent, repeatable and fully automated way by writing Ruby+Watier scripts before writing any code. The test script fully emulates an IE browser object. It instantiates an browser window and issues http request. We can then either assert the html source character by character or more semantically and interactively, do things like @ie(:id, "myLink").click