- From: T. V. Raman <tvraman@us.ibm.com>
- Date: Mon, 16 Dec 2002 13:06:28 -0800
- To: jeremy@dunck.us
- Cc: tvraman@almaden.ibm.com, shelby@coolpage.com, www-html-editor@w3.org, www-style@w3.org
Another way to think of such things in XML is to put on a Lisp hat. With a Lisp hat on, an XML element is just a Lisp special form , i.e. a construct that people use so often that it deserves a special syntax. In that view, the problem we are discussing here should not be viewed as one of class vs id vs idref, but rather as a question of what it is we are trying to enable. If it is indeed the case that there is a particular handler that is generic and rich to justify being wired up to lots of different elements on a page, --say the squishyButtonWithPoorResponse example, we need to ask if it makes more sense to create an XML element in the language in question that does the requisite wiring under the hoods, rather than smatter class or idref attrs all over the page. >>>>> "Jeremy" == Jeremy Dunck <ralinon@hotmail.com> writes: >> From: "T. V. Raman" <tvraman@us.ibm.com> Interesting >> observation --wonder how the CSS group feels about turning CSS >> classes to a means of acquiring interaction behavior which is >> what your suggestion would lead us to. >> >> What I mean is-- >> >> today you use CSS class="squareFlashingRedButton" to get a >> particular look; what you're suggesting is to create >> class="squishyUnresponsiveButton" to mean attach a particular >> feel to all elements having that class. Jeremy> <snip> Jeremy> Since the HTML Class attribute really has little to do Jeremy> with CSS (except to a CSS engine), it'd probably be an OK Jeremy> choice to provide classes of event handling. However, you Jeremy> stand the chance of namespace collisions (that is, is a Jeremy> specific class value for presentation, or for event Jeremy> wiring?). Also, it is not a good solution for the general Jeremy> case of XML, as not all XML schema have classes, while all Jeremy> have IDs. Jeremy> I'd be surprised if using IDREFs for wireup is really the Jeremy> end goal. Perhaps later they will recommend that XQuery Jeremy> or XPath be used to select nodes for a particular event Jeremy> handler. This has the benefit of quick schema-based event Jeremy> wireup, but it's not terribly straight-forward. Jeremy> Of course, there's always manual wireup using the DOM Jeremy> onLoad. Jeremy> The latter is conceptually similar to what many languages Jeremy> supporting dynamic event handlers do, and makes the most Jeremy> sense to me... Jeremy> -Jeremy Jeremy> _________________________________________________________________ Jeremy> Help STOP SPAM with the new MSN 8 and get 2 months FREE* Jeremy> http://join.msn.com/?page=features/junkmail -- Best Regards, --raman ------------------------------------------------------------ T. V. Raman: PhD (Cornell University) IBM Research: Human Language Technologies Architect: Conversational And Multimodal WWW Standards Phone: 1 (408) 927 2608 T-Line 457-2608 Fax: 1 (408) 927 3012 Cell: 1 650 799 5724 Email: tvraman@us.ibm.com WWW: http://www.cs.cornell.edu/home/raman AIM: TVRaman PGP: http://emacspeak.sf.net/raman.asc Snail: IBM Almaden Research Center, 650 Harry Road San Jose 95120
Received on Monday, 16 December 2002 16:08:49 UTC