Re: alternating tags in a list?

Subject: Re: alternating tags in a list?
From: Paul Prescod <paul@xxxxxxxxxxx>
Date: Wed, 16 Dec 1998 13:28:10 -0600
Didier PH Martin wrote:
> 
> Hi Guy,
> 
> If you would have a tool with kind of events fired on pattern match like for
> instance each time the <paragraph> </parapgraph> element is encoutered you
> would have an event fired and the corresponding event handler called. Would
> that be an interessting tool?

This is an excellent idea, but I think that web browsers already have it
built in already. Isn't there some event (perhaps "OnLoad()")that is
triggered for each element as it is loaded into a browser? If so, then you
could solve a problem like coloring rows based on the digits of pi like
this:

<xml:template ...>
   <row onLoad="this.bgcolor=CalculateRowColor( this )">...</row>
</xml:template>

> So the tool would do pattern match and for each element would fire an event
> and the corresponding event handler called. the event handler could be
> written with a script language such as: EcmaScript, VBScript, PerlScript,
> PythonScript. The event handler would receive an object (i.e. a flow object)
> having a property set attached to it. The event handler could either use the
> property set a set values (including the object's type). Then the scrip
> would be able to set the kind of displayed object by setting the object's
> type and the parameters associated to this kind of object.

It isn't clear what the benefits of a language-independent approach would
be. Implementing the visitor pattern is fairly easy and can be done in
each of these languages relatively easily, right? And the resulting code
would not depend on Microsoft technologies.

 Paul Prescod  - ISOGEN Consulting Engineer speaking for only himself
 http://itrc.uwaterloo.ca/~papresco

"Sports utility vehicles are gated communities on wheels" - Anon


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread