[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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
onload this.bgcolor
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.