[I hope this isn't a double posting - sorry if it is] Hi, I am new to using Kid so please excuse me if this is a silly question. I am trying to write a template for my website in order to abstract the content away from the layout. I am having trouble though because kid doesn't do any variable interpolation within XML comments (I think). I suppose this is a design decision, but I think I have two sensible use cases in my template header:
<?xml version='1.0' encoding='utf-8'?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"> <head> <title>${title}</title> <meta name="keywords" content="${keywords}"/> <meta name="description" content="${description}"/> <!--[if gte IE 5.5]> <![if lt IE 7]> <link rel="stylesheet" type="text/css" href="/i/ie.css"/> <script py:if="pngReq" type="text/javascript" src="/i/IEpng.js"></script> <![endif]> <![endif]--> <style type="text/css"> <!-- <![CDATA[ #navigator a#${section} { border-right: 1px solid black; } // ]]> --> </style> </head> I use this template from a Python file like this: -------------------- from kid import Template, XML template = Template( file="page_template.kid", pngReq="true", title="Unit Conversion and Day of the Week", keywords="unit, conversion, factor, date", section="units", description="A list of unit conversion factors and a units calculator. Also a calculator to tell you what day of the week a date fell on.", text=""" blah """) print template.serialize(output="xhtml-strict") -------------------- The interpolation of the title, keywords and description work fine of course, but I have a section using IE conditional comments to only include a stylesheet if the browser is IE (of certain versions) and would also like to sometimes include some IE-specific javascript in the comment block. The second case is where I would like to have interpolation within the inline style declaration (to highlight the section of the site I am in). Can anyone tell me if it is possible to do either of these things? Thank you very much. Stephen Phillips http://scphillips.com ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 _______________________________________________ kid-template-discuss mailing list kid-template-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kid-template-discuss