Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diazo strips xmlns elements #48

Open
loechel opened this issue Oct 18, 2015 · 1 comment
Open

Diazo strips xmlns elements #48

loechel opened this issue Oct 18, 2015 · 1 comment

Comments

@loechel
Copy link
Member

loechel commented Oct 18, 2015

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

@lrowe
Copy link
Member

lrowe commented Oct 22, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants