Jeffrey Blaze wrote:
Hi all,
My question is really about HTML. I am implementing an open source defect tracking system called Roundup (a set of Python modules), and noticed that it uses TAL. However, I looked all through the Roundup and Python HTML and did not find a namespace declaration. Isn’t one required? This from (http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/AppendixC.stx):
The prefix identifies the language, and must be introduced by an XML namespace declaration in XML and XHTML documents, like this:
xmlns:ns="http://language.creator.com/namespaces/MyAttributeLanguage
I realize that the statement above mentions XHTML but not HTML, implying that non-well-formed HTML does not require the declaration. But in the absence of the declaration, how does HTML know how to handle a TAL statement attribute? Why wouldn’t it balk as soon as it sees the tal: prefix?
The TAL parser apparently isn't picky about having TAL namespaces defined in HTML. From that same page: Zope does not require an XML namespace declaration when creating templates with a content-type of text/html. However, it does require an XML namespace declaration for all other content-types. I would gather that it happily assumes that, in HTML (which doesn't parse nicely anyway), anything starting with 'tal:' or 'metal:' is a TAL or METAL attribute. And since they are all parsed and removed by the time the page is rendered it doesn't matter to the consumer of the page, either. --jcc