Hi I have a custom XML file which shows the structure of my website.
It is useful for showing navigation, A-Z, sitemap pages and centralising other information like metadata. An extract is shown here:
I have called this file sitemap.xml. However it isn't in the format required by Google http://www.sitemaps.org/protocol.php (because I needed to add in extra stuff like metadata).Code:<item> <title>Home</title> <link>index.php</link> <keywords>Keywords for home page</keywords> <description>Decription for home page</description> <dateCreated>Tues, 28 Nov 2008 16:00:00 GMT</dateCreated> <dateModified>Tues, 28 Nov 2008 16:00:00 GMT</dateModified> </item>
I was wondering can I add a stylesheet to sitemaps.xml e.g.
And reformat sitemap.xml using this XSL:Code:<?xml-stylesheet type="text/xsl" href="search_engine_sitemap.xsl"?>
Code:<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" /> <xsl:template match="/"> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc> <xsl:apply-templates select="/items//item" /> </loc> </url> </urlset> </xsl:template> <xsl:template match="item"> http://wwww.open.ac.uk/disability/<xsl:value-of select="link"/> </xsl:template> </xsl:stylesheet>




Bookmarks