Browse Source

Updates sitemap.xml for havana release links

Adds an XSLT that transforms a generated sitemap, removing folsom
and trunk links

backport: stable/havana

Change-Id: I4484d50fa60eb53e3155fe4e119c30e54b03832e
Partial-bug: 1191447
tags/0.1
annegentle 6 years ago
parent
commit
40ccf58a78
1 changed files with 19 additions and 0 deletions
  1. 19
    0
      sitemap/transform-sitemap.xslt

+ 19
- 0
sitemap/transform-sitemap.xslt View File

@@ -0,0 +1,19 @@
1
+<?xml version="1.0"?>
2
+<!-- Use this transform on a sitemap.xml file generated from freesitemapgenerator.com -->
3
+<!-- It removes the /trunk URLs and the release URLs that you indicate below, here it's folsom -->
4
+<xsl:stylesheet version="1.0"
5
+    xmlns:sm="http://www.sitemaps.org/schemas/sitemap/0.9"
6
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
7
+    
8
+    <!-- template match equals any other url element, keep -->
9
+    <xsl:template match="node() | @*">
10
+        <xsl:copy>
11
+            <xsl:apply-templates select="node() | @*"/>
12
+        </xsl:copy>
13
+    </xsl:template>
14
+    
15
+    <!-- discard any url/loc that refer to trunk or folsom -->
16
+    <xsl:template match="sm:url[starts-with(./sm:loc,'http://docs.openstack.org/trunk')]"/>
17
+    <xsl:template match="sm:url[starts-with(./sm:loc,'http://docs.openstack.org/folsom')]"/>
18
+    
19
+</xsl:stylesheet>

Loading…
Cancel
Save