Skip to content

Simplified XML header and removed obsolet schema references#46

Closed
max-pfeiffer wants to merge 1 commit into
pelican-plugins:mainfrom
max-pfeiffer:bugfix/xml-header
Closed

Simplified XML header and removed obsolet schema references#46
max-pfeiffer wants to merge 1 commit into
pelican-plugins:mainfrom
max-pfeiffer:bugfix/xml-header

Conversation

@max-pfeiffer

Copy link
Copy Markdown

fixes #44

XML_HEADER = """<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
xmlns:xhtml="http://www.w3.org/1999/xhtml"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Html namespace is still used further below:

XML_TRANSLATION = """<xhtml:link rel="alternate" hreflang="{}" ref="{}/{}"/>

It is referenced here: https://developers.google.com/search/docs/specialty/international/localized-versions#sitemap

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I was not aware of this detail. So what about a header like this then:
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm. 🤷
The others are from https://sitemaps.org/protocol.html#validating — They're obsolete?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, maybe not. Let's just close this pull request.

@max-pfeiffer
max-pfeiffer deleted the bugfix/xml-header branch March 15, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sitemap plugin produces outdated XML header

2 participants