Template <html>/root elements are full of crufty attributes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
Low
|
Unassigned |
Bug Description
The <html> and/or root element in every Launchpad page template contains a lot of XML fluff. For example:
<html
xmlns="http://
xmlns:tal="http://
xmlns:metal="http://
xmlns:i18n="http://
xml:lang="en"
lang="en"
dir="ltr"
metal:
i18n:
>
Or:
<tal:root
xmlns:tal="http://
omit-tag="">
<tal:tag condition=
<html
xmlns="http://
xmlns:metal="http://
xmlns:i18n="http://
xml:lang="en"
lang="en"
dir="ltr"
metal:
i18n:
>
The only attribute here that helps end users is metal:use-macro=, because it determines the page layout. The others are unnecessary, and their duplication in every template invites accidental mangling.
* xmlns=, xmlns:metal=, and xml:lang= reportedly exist only to convince xmllint to validate the templates using XML element nesting rules. Apparently this can be achieved with a Relax-NG schema instead.
* xml:lang=, lang=, and dir= are overridden by main-template.pt, so never have any effect.
* xmlns:i18n= and i18n:domain= are obsolete (see bug 3896).
Changed in launchpad-foundations: | |
status: | New → Triaged |
importance: | Undecided → Low |
visibility: | private → public |
The xmlns attributes are necessary to make the document well formed XML. A RELAX-NG schema is not going to help you validate a badly formed XML file.