Howdy!
I'm attempting to automatically create a Google Sitemap XML file, and want to
add a meaningful comment to the header. So far, to get around the fact that
KID is an XML-compliant parser (thus ignoring comments completely) I have
produced the following:
<div py:strip="True" py:content="'<!--'" />
This Google XML Sitemap was automatically generated by TG Content.
This sitemap is completely dynamic and always up-to-date.
The copy your are viewing was generated
${now.strftime('%Y-%m-%dT%H:%M:%S-07:00')}.
<div py:strip="True" py:content="'-->'" />
The result is thus:
<!--
This Google XML Sitemap was automatically generated by TG Content.
This sitemap is completely dynamic and always up-to-date.
The copy your are viewing was generated 2006-04-21T02:55:26-07:00.
-->
Why is the < not being transformed into a <, while < is? I would really
rather not code this message into the controller (and set up a XML node to
force it to not escape). I'd call this a bug - one way or the other.
Then there's the question of how to keep the character you want to escape in
the final output escaped - &amp;? I've done stranger things in PHP...
- Matthew
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---