Subject: RE: alternating tags in a list? From: "Didier PH Martin" <martind@xxxxxxxxxxxxx> Date: Wed, 16 Dec 1998 17:31:04 -0500 |
Hi Paul, Thread 1 ----------------------------------------------- > 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> Reply --------------------------------------------------- What I meant is: Premises: a) XML document with only semantic tags. b) a transformation script that will transform this XML into a displayable thing. c) components based on VTBL interfaces are not necessarily Microsoft dependant :-) (An example is the FLUKE Oskit from University of Utah) Hypothesis: It seems that languages like XSL or DSSSL are rule based. Or based on: <Pattern or rule> |______ <action> So we have two parts like we already have on production systems found in expert systems. So, it seems that the rule or pattern part is useful. Why, because we don't have to scan the whole grove or document object hierarchy with loops and other similar constructs. Thus, it seems that everybody agrees that this part is useful. the problem is with the <action> part. Theorists see no problems but pragmatist see problems of flexibility. So then, why not have the <action> part defined as a script then? Even better, you could pick the script of your choice by invoking the script engine of your choice that does the best job for that particular context. the script could then be given an API or set of object to create the appropriate Flow object hierarchy or whatever the layout pattern used. Thread 2 ------------------------------------------------------ > 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. Reply --------------------------------------------------------- You are right, the visitor pattern could be done in each of these languages. However, if that is done for you, it means less work isn't it ;-) And I don't see the relationship between Microsoft dependencies and a schema like suggested ?? If I where a DOJ lawyer probably, but we are not lawyers, don't we? Conclusion: I just tried to understand where the problem is. And from my understanding it seems that maybe the problem is in the second part of XSL statements not the first part. I mean not the pattern match part that everybody find quite useful (you don't have to implement it yourself) but the action part that people involved in _real_ web projects seems to find limitative. Maybe, what we have to read from all the comments people are making on this is that the language suffer from procedural limitations (i.e. the action part or the procedural part - the part that tells what to do when such a pattern is encountered) A different point of view worth a thousand point of IQ. Didier PH Martin mailto:martind@xxxxxxxxxxxxx http://www.netfolder.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: alternating tags in a list?, Paul Prescod | Thread | Re: alternating tags in a list?, Paul Prescod |
Re: alternating tags in a list?, Paul Prescod | Date | RE: alternating tags in a list?, Reynolds, Gregg |
Month |