sitemap.xsl 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <xsl:stylesheet version="1.0"
  2. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns:s="http://www.sitemaps.org/schemas/sitemap/0.9"
  4. exclude-result-prefixes="s"
  5. >
  6. <xsl:template match="/">
  7. <html>
  8. <head>
  9. <meta name="robots" content="noindex" />
  10. <title>
  11. XML Sitemap
  12. </title>
  13. <style type="text/css">
  14. @import url('//cdn.jsdelivr.net/pure/0.6.0/base-min.css');
  15. @import url('//cdn.jsdelivr.net/pure/0.6.0/pure-min.css');
  16. @import url('//cdn.jsdelivr.net/pure/0.6.0/grids-responsive-min.css');
  17. @import url('//fonts.googleapis.com/css?family=Raleway:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic');
  18. .font_smooth {
  19. font-smooth: auto;
  20. text-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
  21. text-rendering: auto;
  22. -webkit-font-smoothing: antialiased;
  23. -webkit-text-size-adjust: 100%
  24. }
  25. html {
  26. font-smooth: auto;
  27. text-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
  28. text-rendering: auto;
  29. -webkit-font-smoothing: antialiased;
  30. -webkit-text-size-adjust: 100%;
  31. background-color: #fff
  32. }
  33. body {
  34. font-family: 'Raleway', sans-serif;
  35. font-size: 20px;
  36. line-height: 1.8em;
  37. letter-spacing: 0;
  38. text-align: left;
  39. color: #333
  40. }
  41. body {
  42. overflow: auto;
  43. padding: 20px
  44. }
  45. .clear {
  46. clear: both;
  47. float: none
  48. }
  49. a,
  50. a:link,
  51. a:visited {
  52. text-decoration: none;
  53. border-bottom: dotted 1px #333;
  54. color: #333
  55. }
  56. h1,h2,h3,h4,h5,h6 {
  57. font-family: Raleway;
  58. font-weight: 300;
  59. line-height: 1.2em;
  60. letter-spacing: 0px;
  61. color: #000
  62. }
  63. table {
  64. margin: 0 auto;
  65. }
  66. th {
  67. border: solid 1px #cbcbcb !important;
  68. text-align: center;
  69. background: #fff
  70. }
  71. </style>
  72. </head>
  73. <body>
  74. <table class="pure-table pure-table-striped" border="0">
  75. <thead>
  76. <tr>
  77. <th colspan="5">Sitemap</th>
  78. </tr>
  79. <tr>
  80. <th></th>
  81. <th>Location</th>
  82. <th>Last Modified</th>
  83. <th>Update Frequency</th>
  84. <th>Priority</th>
  85. </tr>
  86. </thead>
  87. <tfoot>
  88. </tfoot>
  89. <tbody>
  90. <xsl:for-each select="s:urlset/s:url">
  91. <xsl:sort select="s:loc" />
  92. <tr>
  93. <xsl:variable name="loc"><xsl:value-of select="s:loc"/></xsl:variable>
  94. <xsl:variable name="pno"><xsl:value-of select="position()"/></xsl:variable>
  95. <td><xsl:value-of select="$pno"/></td>
  96. <td><a href="{$loc}"><xsl:value-of select="s:loc"/></a></td>
  97. <td><xsl:value-of select="s:lastmod"/></td>
  98. <td><xsl:value-of select="s:changefreq"/></td>
  99. <td><xsl:value-of select="s:priority"/></td>
  100. </tr>
  101. </xsl:for-each>
  102. </tbody>
  103. </table>
  104. </body>
  105. </html>
  106. </xsl:template>
  107. </xsl:stylesheet>