Re: [Wheat-developer] comments on template attributes syntax
Status: Pre-Alpha
Brought to you by:
mark_lentczner
From: Donovan P. <wh...@ul...> - 2005-04-07 18:48:46
|
On Apr 7, 2005, at 10:32 AM, Mark Lentczner wrote: > Kragen had this idea that TinyTemplate should (or could) leave the > tt:name fields in-tact after expansion. Then the XHTML page would > have a level of semantic markup in it -- which is sort of cool. BUT, > it dawns on me that this would automatically give you the ids you > need. So, rather than fetching nodes by id attribute, surely you can > code a utility routine that can fetch nodes by tt:name attribute. This is a good idea but... Heh. This is the w3c DOM we're talking about here. ids are pretty much the only sane way to do it. We may be able to cook something up using the NodeIterator or TreeWalker or whatever DOM extension that is, but I'm not sure how well supported it is cross browser. Also, I have a fuzzy memory of some browsers just silently discarding node attributes they don't recognize from the DOM (Safari?). Anyway, we'll figure something out! :-) dp |