source: extensions/rv_sitemap/sitemap.xsl @ 20461

Last change on this file since 20461 was 16301, checked in by rvelices, 12 years ago

rv_sitemap add urls to picture pages

File size: 3.8 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<xsl:stylesheet version="2.0" 
3                xmlns:html="http://www.w3.org/TR/REC-html40"
4                                xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
5                xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
6                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
7        <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
8        <xsl:template match="/">
9                <html xmlns="http://www.w3.org/1999/xhtml">
10                        <head>
11                                <title>XML Sitemap</title>
12                                <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
13                                <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
14                                <!-- <script type="text/javascript" src="jquery.tablesorter.min.js"></script>
15                                <script type="text/javascript"><![CDATA[
16                                        $(document).ready(function() {
17                                        $("#sitemap").tablesorter( { widgets: ['zebra'] } );
18                                        });
19                                ]]></script> -->
20                                <style type="text/css">
21                                        body {
22                                                font-family: Helvetica, Arial, sans-serif;
23                                                font-size: 13px;
24                                                color: #545353;
25                                        }
26                                        table {
27                                                border: none;
28                                                border-collapse: collapse;
29                                        }
30                                        #sitemap tr.odd {
31                                                background-color: #eee;
32                                        }
33                                        #sitemap tbody tr:hover {
34                                                background-color: #ccc;
35                                        }
36                                        #sitemap tbody tr:hover td, #sitemap tbody tr:hover td a {
37                                                color: #000;
38                                        }
39                                        #content {
40                                                margin: 0 auto;
41                                                width: 1000px;
42                                        }
43                                        .expl {
44                                                margin: 10px 3px;
45                                                line-height: 1.3em;
46                                        }
47                                        .expl a {
48                                                color: #da3114;
49                                                font-weight: bold;
50                                        }
51                                        a {
52                                                color: #000;
53                                                text-decoration: none;
54                                        }
55                                        a:visited {
56                                                color: #777;
57                                        }
58                                        a:hover {
59                                                text-decoration: underline;
60                                        }
61                                        td {
62                                                font-size:11px;
63                                        }
64                                        th {
65                                                text-align:left;
66                                                padding-right:30px;
67                                                font-size:11px;
68                                        }
69                                        thead th {
70                                                border-bottom: 1px solid #000;
71                                                cursor: pointer;
72                                        }
73                                </style>
74                        </head>
75                        <body>
76                                <div id="content">
77                                        <h1>XML Sitemap</h1>
78                                        <p class="expl">
79                                                Generated by <a href="http://yoast.com/">Yoast</a>'s WordPress SEO plugin, this is an XML Sitemap, meant for consumption by search engines.
80                                        </p>
81                                        <p class="expl">
82                                                You can find more information about XML sitemaps on <a href="http://sitemaps.org">sitemaps.org</a>.
83                                        </p>
84                                        <p class="expl">
85                                                This sitemap contains <xsl:value-of select="count(sitemap:urlset/sitemap:url)"/> URLs.
86                                        </p>                   
87                                        <table id="sitemap" cellpadding="3">
88                                                <thead>
89                                                        <tr>
90                                                                <th width="75%">URL</th>
91                                                                <th width="5%">Priority</th>
92                                                                <th width="5%">Images</th>
93                                                                <th width="5%">Change Freq.</th>
94                                                                <th width="10%">Last Change</th>
95                                                        </tr>
96                                                </thead>
97                                                <tbody>
98                                                        <xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/>
99                                                        <xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
100                                                        <xsl:for-each select="sitemap:urlset/sitemap:url">
101                                                                <tr>
102                                                                        <td>
103                                                                                <xsl:variable name="itemURL">
104                                                                                        <xsl:value-of select="sitemap:loc"/>
105                                                                                </xsl:variable>
106                                                                                <a href="{$itemURL}">
107                                                                                        <xsl:value-of select="sitemap:loc"/>
108                                                                                </a>
109                                                                        </td>
110                                                                        <td>
111                                                                                <xsl:value-of select="concat(sitemap:priority*100,'%')"/>
112                                                                        </td>
113                                                                        <td>
114                                                                                <xsl:value-of select="count(image:image)"/>
115                                                                        </td>
116                                                                        <td>
117                                                                                <xsl:value-of select="concat(translate(substring(sitemap:changefreq, 1, 1),concat($lower, $upper),concat($upper, $lower)),substring(sitemap:changefreq, 2))"/>
118                                                                        </td>
119                                                                        <td>
120                                                                                <xsl:value-of select="concat(substring(sitemap:lastmod,0,11),concat(' ', substring(sitemap:lastmod,12,5)))"/>
121                                                                        </td>
122                                                                </tr>
123                                                        </xsl:for-each>
124                                                </tbody>
125                                        </table>
126                                </div>
127                        </body>
128                </html>
129        </xsl:template>
130</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.