On Sun, 2007-02-11 at 09:49 +0100, Christoph Zwerschke wrote: > --- page.kid --- > <html xmlns:py="http://purl.org/kid/ns#" > py:layout="'layout.kid'"> > <head py:match="item.tag == 'head'"> > <meta py:replace="item[:]"/> > <link href="chrome/special.css" type="text/css" rel="stylesheet"/> > </head> > <!-- ... --> > </html>
Awesome, that worked well. Thanks! I was thinking of something along these lines, but I assumed in the child replace that "item" would refer to the <meta> element, not the <head> as it appears to do so above. How exactly does this work? Also, out of curiosity, has there been any discussion about providing a few optional element equivalents for some of the kid attributes so there aren't random elements being added just to allow an attribute to be specified, as has been done above? For example, taking the template above: <html xmlns:py="http://purl.org/kid/ns#" py:layout="'layout.kid'"> <head py:match="item.tag == 'head'"> <py:replace value="item[:]"/> <link href="chrome/special.css" type="text/css" rel="stylesheet"/> </head> <!-- ... --> </html> It's about the same about of typing, but I think it is a bit more clear. Adding random elements just to use an attribute makes me feel kinda dirty. :) /Mike -- Michael Gratton <[EMAIL PROTECTED]> Quuxo Software <http://web.quuxo.com/>
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ kid-template-discuss mailing list kid-template-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kid-template-discuss