XSLT, do we need @blocks?
I was working with XSLT today and after some thought I realised that this (especially XSLT2) is turning into a proper programming language (of sorts). If you code XSLT and use the template system aggreesively you can really start to produce well structured XSLT (trust me, this is hard).
It leads me to think about introduced the well known @ comment tags. Creating XSLT with a “methodised” approach could really bring a display language into it’s own: e.g.:
<!--
@name getTableListing
@desc Gets a table listing
@param title:String - The title of the table
@author jh
-->
<xsl :template name="getTableListing">
<xsl :param name="title"/>
<xsl :if test="/ms/test = '1'">
<xsl :value-of select="."/>
</xsl:template>
This kind of approach really starts to produce maintainable style sheets. In fact we need a plugin for eclipse that also does the atypical predictive drop down approach when calling xslt functions - that would be sweet.
Add comment November 16th, 2005