Con,
Quite right in pointing out the W3C reco and the warning against loops.
In the interests of Wendell's original question which you too judge a
feasible and valuable project.
I too want insist on instances. But not by eliminating recursivity.
An XSLT instance can itself be the subject of XSLT transformation, and, as
we have seen Michael Beddow illustrate, of analysis. It becomes possible
to test for loop constructions (which is not the same as testing looping).
Take the example for the W3C recommendation:
<xsl:template match="foo">
<xsl:apply-templates select="."/>
</xsl:template>
and consider generate() and then testing if for a given <xsl:template>
element what the value of the "match" attribute "match" exists might be
and compare with any <xsl:apply-template> elements that might be located
on the child axis of the given <xsl:template> element with a "select"
attribute of a specified value.
Again, in short, XSLT transform files are themselves transformable using
XSLT.
There must be some way of mapping the recursive functions and nesting of a
stylesheet to the permissible nesting of the input and output instances.
--
Francois Lachance, Scholar-at-large
http://www.chass.utoronto.ca/~lachance/jardin
2005 Year of Comparative Connections. DIA: Comparative connections? LOGZ:
Connection, first. Comparison, next. DIA: Check. Comparable ways of
connecting. LOGZ: Selection outcomes, first. Comparative Connections,
next.
|