#33117: sitemap.xml template used with alternates for multiple languages returns an invalid xml ----------------------------------+-------------------------------------- Reporter: Viggie | Owner: nobody Type: Bug | Status: new Component: contrib.sitemaps | Version: 3.2 Severity: Normal | Resolution: Keywords: | Triage Stage: Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 1 | UI/UX: 0 ----------------------------------+--------------------------------------
Comment (by Florian Demmer): What validator was used to produce this error? Not only is the namespace name "http://www.w3.org/1999/xhtml" valid, the name "http://www.w3.org/1999/xhtml/" (with trailing slash) would be a different namespace. As specified in [https://www.w3.org/TR/REC-xml-names/#NSNameComparison 2.3 Comparing URI References]: URI references identifying namespaces are compared when determining whether a name belongs to a given namespace, and whether two names belong to the same namespace. [Definition: The two URIs are treated as strings, and they are identical if and only if the strings are identical, that is, if they are the same sequence of characters. ] The comparison is case- sensitive, and no %-escaping is done or undone. and [https://www.w3.org/TR/REC-xml-names/#ns-decl 3 Declaring Namespaces]: The namespace name, to serve its intended purpose, SHOULD have the characteristics of uniqueness and persistence. It is not a goal that it be directly usable for retrieval of a schema (if any exists). The namespace name for XHTML is specified [https://www.w3.org/1999/xhtml/ here]: The namespace name http://www.w3.org/1999/xhtml is intended for use in various specifications such as: [...] Therefore I conclude, that the validator and the StackOverflow recommendations are wrong and nothing should be changed in the {{{sitemap.xml}}} template. -- Ticket URL: <https://code.djangoproject.com/ticket/33117#comment:2> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/070.04497b3cd6f5df6d915d5ae73d04cfb3%40djangoproject.com.