Re: [Wheat-developer] comments on template attributes syntax
Status: Pre-Alpha
Brought to you by:
mark_lentczner
|
From: Mark L. <ma...@gl...> - 2005-04-07 17:32:28
|
On Wed, 2005-04-06 at 18:39 -0700, Donovan Preston wrote: > This is why I was advocating applying ids to the nodes you want to test 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. The only hitches in this scheme are 1) tt:name values don't have to be unique as the same expansion could be used twice (as in <title tt:name="title">foo</title> ... <h1 tt:name="title">foo</h1> ) 2) tt:name values could be repeated multiple times (as in table rows) 3) tt:name values may have to be considered hierarchically These don't seem to pose to much a problem to me: The tests would be coded as one of: 1) a single replacement (tt:name="title" should expand to "Bob's Blog"), in which case it must expand to the same thing every where it appears 2) a list of replacements (tt:name="item"/0 should expand to "apple", tt:name="item"/1 should exapnd to "orange"...) The third one is a little more tricky, but we just need some what for the test writer to capture the expected nested expansions: inside tt:name="item"/0 there should be tt:name="name" expanded to "hammer" tt:name="price" expanded to "12.50" inside tt:name="item"/1 there should be tt:name="name" expanded to "wrench" tt:name="price" expanded to "21.00" etc... On Wed, 2005-04-06 at 18:39 -0700, Donovan Preston wrote: > Should I plan on coming down Friday? On Apr 7, 2005, at 9:37 AM, Kragen Sitaker wrote: > I'd love to have the opportunity to work with you on Friday. I think this is excellent. I'll be there two - but you two should pair this week. I might be able to get my friend Bruce to come down and pair with me.... - Mark |