diff options
author | randomdan <randomdan@localhost> | 2012-03-17 01:26:05 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2012-03-17 01:26:05 +0000 |
commit | e3e86c54c5ea7aa65fbc4c98735687e61d516e32 (patch) | |
tree | 78564d876928292df03aee8be8a6eb3ba9424205 /gentoobrowse/xslt | |
parent | Create 404s when row sets optionally don't return rows (diff) | |
download | gentoobrowse-e3e86c54c5ea7aa65fbc4c98735687e61d516e32.tar.bz2 gentoobrowse-e3e86c54c5ea7aa65fbc4c98735687e61d516e32.tar.xz gentoobrowse-e3e86c54c5ea7aa65fbc4c98735687e61d516e32.zip |
Add a sitemap
Diffstat (limited to 'gentoobrowse/xslt')
-rw-r--r-- | gentoobrowse/xslt/sitemap.xslt | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gentoobrowse/xslt/sitemap.xslt b/gentoobrowse/xslt/sitemap.xslt new file mode 100644 index 0000000..a90e150 --- /dev/null +++ b/gentoobrowse/xslt/sitemap.xslt @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" + xmlns:project2="http://project2.randomdan.homeip.net" exclude-result-prefixes="project2" > + <xsl:output encoding="utf-8" method="xml" media-type="text/xml" indent="yes" /> + <xsl:template match="/gentoo"> + <urlset> + <url> + <loc>http://gentoobrowse.randomdan.homeip.net/</loc> + <changefreq>daily</changefreq> + </url> + <url> + <loc>http://gentoobrowse.randomdan.homeip.net/popular</loc> + <changefreq>weekly</changefreq> + </url> + <url> + <loc>http://gentoobrowse.randomdan.homeip.net/categories</loc> + <changefreq>monthly</changefreq> + </url> + <xsl:for-each select="packages/package"> + <url> + <loc>http://gentoobrowse.randomdan.homeip.net/package/<xsl:value-of select="catname" />/<xsl:value-of select="pkgname" /></loc> + <lastmod><xsl:value-of select="moddate" /></lastmod> + <changefreq>weekly</changefreq> + </url> + </xsl:for-each> + <xsl:for-each select="categories/category"> + <url> + <loc>http://gentoobrowse.randomdan.homeip.net/category/<xsl:value-of select="catname" /></loc> + <lastmod><xsl:value-of select="pkgfirstseen" /></lastmod> + <changefreq>daily</changefreq> + </url> + </xsl:for-each> + </urlset> + </xsl:template> +</xsl:stylesheet> + |