Hi all,
following a thread on the TurboGears mailing list [1], I'm trying to
accomplish including a xml-stylesheet processing instruction into a
template for an RSS/Atom feed AND make that PI dynamic.
So far without luck.
Kid doesn't honor any directives in processing
instructions, it doesn't even do ${}-expansion, so you can't do:
<?xml-stylesheet type="text/xsl" href="${stylesheet}"?>
<rss ...>
...
</rss>
as it will just show up unaltered in the output. This also doesn't work:
<?xml-stylesheet py:if="defined('stylesheet')" type="text/xsl"
href="${stylesheet}"?>
<rss ...>
...
Nor this:
<div py:if="defined('stylesheet')" py:strip="">
<?xml-stylesheet type="text/xsl" href="${stylesheet}"?>
</div>
<rss ...>
...
because you can't have a second top-level element before the the
'rss/feed' document element.
What I ultimately want to achieve, is to be able to set the stylesheet
URL from my controller method and leave out the PI entirely, when the
stylesheet URL is not set.
It seem that this currently not possible with Kid (and, btw, neither
with Genshi) or am I missing something?
Should I open a ticket with a feature request for this?
Chris
[1] http://tinyurl.com/2t2ken
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
kid-template-discuss mailing list
kid-template-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kid-template-discuss