Tuesday 02 January, 2007
Latest commits sort xsl:templates by priority, which is jolly super really. One last little bit to do on that
It is an error if this leaves more than one matching template rule. An XSLT processor may signal the error; if it does not signal the error, it must recover by choosing, from amongst the matching template rules that are left, the one that occurs last in the stylesheet.Not quite sure which tack to take yet. Signalling an error would be easier, but slower at stylesheet runtime. Doing the one that occurs last will be slightly more work, but more useful and slightly quicker when running the stylesheet. I'll see how the mood takes me, but Saxon, MS-XSLT and Xalan all recover. Saxon issues are warning too, so it's taking the runtime hit too.
I was wrong about how much extra work it would be to resolve a conflict in favour if the later template. It took exactly one line :)
jez, 3rd Jan 2007