Tuesday, January 18, 2011

Site Map XSL : Valid for SiteMap.org Specification XML

I was chasing my tail for a while trying to figure out why my XSL stylesheets were not working with every XML sitemap I tried. The problem was, every XML sitemap I tried was using an invalid XML namespace. They were using a namespace hosted on Google at http://www.google.com/schemas/sitemap/0.84. This namespace is invalid. Some were referencing http://www.google.com/schemas/sitemap/0.9 which is also invalid. The correct working namespace to use is http://www.sitemaps.org/schemas/sitemap.0.9 .

Here is a really simple version of the XSL required to render the Site Map XML (with valid namespace) as HTML:



I, also, added this XSL as one of the many default XSL choices when setting up feed transforms on PORDL.com.

No comments:

Post a Comment