diazo
diazo copied to clipboard
Diazo strips xmlns elements
I have a Theme where I want to have ESI declared in the Theme, not via the Rules.
Diazo seams to strip the xmlns namespace tags on elements so that it did not work:
Theme:
<esi:remove >
<div>...</div>
</esi:remove>
got translated to:
<remove>
<div>...</div>
</remove>
same on
<esi:include src="/path" / > --> <include src="/path" />
I guess this will also apply to other XMLNS additions of HTML
This is unavoidable as all namespace prefixes are stripped by the libxml2 HTMLParser.
HTML has no concept of namespaces, though browsers do seem to allow ':' in element and attribute names which at least preserves them.
From the command line, Diazo does at least partially support using the XMLParser when compiling a theme. Perhaps a parser
attribute could be added to the <theme>
element to specify the parser on a per theme basis in rules.py expand_themes.