[Yanel-commits] rev 36308 - public/yanel/trunk/src/contributions/resources/data-repo-sitetree/htdocs

michi at wyona.com michi at wyona.com
Fri May 2 15:05:37 CEST 2008


Author: michi
Date: 2008-05-02 15:05:37 +0200 (Fri, 02 May 2008)
New Revision: 36308

Added:
   public/yanel/trunk/src/contributions/resources/data-repo-sitetree/htdocs/google-sitemap.xsl
Log:
XSLT for generating a 'google' sitemap

Added: public/yanel/trunk/src/contributions/resources/data-repo-sitetree/htdocs/google-sitemap.xsl
===================================================================
--- public/yanel/trunk/src/contributions/resources/data-repo-sitetree/htdocs/google-sitemap.xsl	                        (rev 0)
+++ public/yanel/trunk/src/contributions/resources/data-repo-sitetree/htdocs/google-sitemap.xsl	2008-05-02 13:05:37 UTC (rev 36308)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:yanel="http://www.wyona.org/yanel/1.0"
+>
+
+<!-- See https://www.google.com/webmasters/tools/docs/en/protocol.html -->
+
+  <xsl:param name="yanel.back2realm" select="'BACK2REALM_IS_NULL'"/>
+  <xsl:param name="yanel.reservedPrefix" select="'RESERVEDPREFIX_IS_NULL'"/>
+
+  <xsl:template match="/">
+    <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+        <xsl:apply-templates select="/sitetree/collection"/>
+    </urlset>
+  </xsl:template>
+
+  <xsl:template match="collection">
+    <url><loc><xsl:value-of select="@path"/></loc></url>
+    <xsl:apply-templates/>
+  </xsl:template>
+
+  <xsl:template match="resource">
+    <url><loc><xsl:value-of select="@path"/></loc></url>
+  </xsl:template>
+
+  <xsl:template match="label"></xsl:template>
+
+  <xsl:template match="neither-resource-nor-collection"></xsl:template>
+  
+</xsl:stylesheet>



More information about the Yanel-commits mailing list