A tumblelog CMS built on AJAX, PHP and MySQL.

sitemap.xsl 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet version="2.0" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
  4. <xsl:template match="/">
  5. <html xmlns="http://www.w3.org/1999/xhtml">
  6. <head>
  7. <title>XML Sitemap</title>
  8. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  9. <style type="text/css">
  10. body {
  11. font-family:"Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana;
  12. font-size:13px;
  13. }
  14. #intro {
  15. background-color:#CFEBF7;
  16. border:1px #2580B2 solid;
  17. padding:5px 13px 5px 13px;
  18. margin:10px;
  19. }
  20. #intro p {
  21. line-height: 16.8667px;
  22. }
  23. td {
  24. font-size:11px;
  25. }
  26. th {
  27. text-align:left;
  28. padding-right:30px;
  29. font-size:11px;
  30. }
  31. tr.high {
  32. background-color:whitesmoke;
  33. }
  34. #footer {
  35. padding:2px;
  36. margin:10px;
  37. font-size:8pt;
  38. color:gray;
  39. }
  40. #footer a {
  41. color:gray;
  42. }
  43. a {
  44. color:black;
  45. }
  46. </style>
  47. </head>
  48. <body>
  49. <h1>XML Sitemap</h1>
  50. <div id="intro">
  51. <p>
  52. This is a XML Sitemap which is supposed to be processed by search engines like <a href="http://www.google.com/">Google</a>, <a href="http://search.msn.com/">MSN Search</a> and <a href="http://www.yahoo.com/">YAHOO</a>.<br/>
  53. It was generated using the Tumblelogging-Software <a href="http://www.gelatocms.com/">Gelato CMS</a>.<br/>
  54. You can find more information about XML sitemaps on <a href="http://sitemaps.org/">sitemaps.org</a> and Google's <a href="http://code.google.com/sm_thirdparty.html">list of sitemap programs</a>.
  55. </p>
  56. </div>
  57. <div id="content">
  58. <table cellpadding="5">
  59. <tr style="border-bottom: 1px solid black;">
  60. <th>URL</th>
  61. <th>Priority</th>
  62. <th>Change Frequency</th>
  63. <th>LastChange</th>
  64. </tr>
  65. <xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/>
  66. <xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
  67. <xsl:for-each select="sitemap:urlset/sitemap:url">
  68. <tr>
  69. <xsl:if test="position() mod 2 != 1">
  70. <xsl:attribute name="class">high</xsl:attribute>
  71. </xsl:if>
  72. <td>
  73. <xsl:variable name="itemURL">
  74. <xsl:value-of select="sitemap:loc"/>
  75. </xsl:variable>
  76. <a href="{$itemURL}">
  77. <xsl:value-of select="sitemap:loc"/>
  78. </a>
  79. </td>
  80. <td>
  81. <xsl:value-of select="concat(sitemap:priority*100,'%')"/>
  82. </td>
  83. <td>
  84. <xsl:value-of select="concat(translate(substring(sitemap:changefreq, 1, 1),concat($lower, $upper),concat($upper, $lower)),substring(sitemap:changefreq, 2))"/>
  85. </td>
  86. <td>
  87. <xsl:value-of select="concat(substring(sitemap:lastmod,0,11),concat(' ', substring(sitemap:lastmod,12,5)))"/>
  88. </td>
  89. </tr>
  90. </xsl:for-each>
  91. </table>
  92. </div>
  93. <div id="footer">
  94. gelato CMS :: PHP/MySQL Tumblelog Content Management System.
  95. </div>
  96. </body>
  97. </html>
  98. </xsl:template>
  99. </xsl:stylesheet>