[Home] [By Thread] [By Date] [Recent Entries]
On 1 Apr 2009, at 23:32 , Vyacheslav Sedov wrote:
But I do maintain that this is not the same kind of self-modification that computer scientists played with and practical programmers used (as Michael Kay said) in the 1950s and 1960s (and in some cases later). The differences may not be crucial to what you want to do -- but they are crucial to the maintainability and understandability of the program. Dynamic generation of a program may be easy or hard to understand, but it will almost always be simpler and easier to understand and debug than self-modification in place. One important difference: while debugging a system of the kind you describe, you can write out the source code for the modified stylesheet and study it. The source you study is the same source as the XSLT processor will be compiling and running. That kind of inspection of the generated code is not possible in the same way with programs that overwrite their binary form in memory with different machine instructions, in binary. That difference and others like it are, in turn, why I'm happy for Saxon to have a transform() function, but would be less happy to have it offer dynamic self-modification of a running stylesheet (by, say, adding new templates). Your mileage, of course, may vary. -- **************************************************************** * C. M. Sperberg-McQueen, Black Mesa Technologies LLC * http://www.blackmesatech.com * http://cmsmcq.com/mib * http://balisage.net ****************************************************************
|

Cart



