Re: [xsl] xsl:key in a function?

Subject: Re: [xsl] xsl:key in a function?
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Tue, 06 Mar 2012 08:45:26 +0000
Its not that Im against generating code. Generating XSLT code (particularly: generating matching patterns) can give you lots of flexibility without the need to sacrifice performance.

When you decide to implement code-generation, you have to make some decisions.

* Do you intend the generated code to be read and debugged by human beings?

* Do you intend the generated code to be modified?

Most code generators don't have clear answers to these questions. They want to have it both ways: allow programmers to read and modify the generated code so that there's an "escape hatch" when the functionality or performance of the source language proves inadequate to the task, but without taking the consequences in terms of producing readable and maintainable output.

Michael Kay

Current Thread