Well guys
So like many people here, I'm also trying to make my first xml file for the sitemap. Here is what I got till now:
To make it human readable, here is what I added in my gss.xsl:Code XML:<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="gss.xsl"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" 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"> <url> <loc>http://www.mysite.com/</loc> <priority>1.00</priority> <changefreq>monthly</changefreq> </url> <url> <loc>http://www.mysite.com/nextpage.html</loc> <priority>0.80</priority> <changefreq>monthly</changefreq> </url> </urlset>
... rest same as the main site, thenCode XML:<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xna="http://www.sitemaps.org/schemas/sitemap/0.9" exclude-result-prefixes="xna"> <xsl:output indent="yes" method="html" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" omit-xml-declaration="yes"/> <xsl:template match="/"> <html>
... then some more stuffs from the other pages ... and finallyCode XML:<ol id="sitemap"> <xsl:for-each select="xna:urlset/xna:url"> <li> <xsl:variable name="sitemapURL"><xsl:value-of select="xna:loc"/></xsl:variable> <a href="{$sitemapURL}"><xsl:value-of select="$sitemapURL"></xsl:value-of></a> </li> </xsl:for-each> </ol>
I have added stuffs from other pages so that the sitemap looks similar to the rest of the site.Code XML:</xsl:template> </xsl:stylesheet>
The page looks ok, but I got my first problem while validating the page.I am having a feeling that once I clear this one, I might have other surprises as well. But first thing first, though I am adding a doctype in my xsl file, I am getting the error of doctype not found.No DOCTYPE found! Checking XML syntax only.
What should I do to correct my page?
Thanks for any help.





Bookmarks