I am using the following MarkupTemplate:
----------
<b py:if="foo">${bar}</b>
----------
and get the following error message:
----------
unbound prefix: line 1, column 0, in login_form.tmpl
----------
This is of course correct, because according to the documentation
Genshi checks whether the "py" namespace was declared.
However, I am trying to use MarkupTemplate to generate HTML snippets,
not a complete web page, so I can not declare the namespace within the
template. Is there a way to generate from XML even if the namespace is
not declared?
-Samuel
The following is an HTML snippet. Because the <html> tag has
py:strip="", it gets stripped out:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
<p id="indexLink" style="text-align: right">
[<a href="/">List of Messages</a>]
</p>
<h1>Welcome to Seamstress Exchange!</h1>
<p class="action-results"
py:if="c.action_results"
py:content="c.action_results">
</p>
</html>
Happy Hacking!
-jj