XSLT is a language for transforming XML documents into other XML documents. A Sitemap is an XML file that lists the URLs for a site, so we can use XSLT to transform an RSS document into an XML Sitemap.
In this article I'll describe how to use PHP to transform your RSS document into an XML Sitemap and specify it's location in your robots.txt file for 'Autodiscovery.'
The Feed (feed.xml)
The XSL Stylesheet (sitemap.xslt)
The Transformation (sitemap.php)
The Sitemap (sitemap.xml)
If you have more than 50,000 URLs, you will have to create multiple Sitemap files. You can submit these separately or list them in a Sitemap Index file (both are equally effective).
Specifying the Sitemap Location in Your robots.txt File
The sitemap location should be the complete URL to the Sitemap, such as: http://blog.example.com/sitemap.xml. This directive is independent of the user‑agent line, so it doesn't matter where it is placed in the file.