[3417] | 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:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9" |
---|
| 5 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
---|
| 6 | <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/> |
---|
| 7 | <xsl:template match="/"> |
---|
| 8 | <html xmlns="http://www.w3.org/1999/xhtml"> |
---|
| 9 | <head> |
---|
| 10 | <title>XML Sitemap</title> |
---|
| 11 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
---|
| 12 | <style type="text/css"> |
---|
| 13 | body { |
---|
| 14 | font-family:"Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana; |
---|
| 15 | font-size:13px; |
---|
| 16 | } |
---|
| 17 | |
---|
| 18 | #intro { |
---|
| 19 | border:1px black solid; |
---|
| 20 | padding:5px 13px 5px 13px; |
---|
| 21 | margin:10px; |
---|
| 22 | } |
---|
| 23 | |
---|
| 24 | #intro p { |
---|
| 25 | line-height: 16.8667px; |
---|
| 26 | } |
---|
| 27 | |
---|
| 28 | td { |
---|
| 29 | font-size:11px; |
---|
| 30 | } |
---|
| 31 | |
---|
| 32 | th { |
---|
| 33 | text-align:left; |
---|
| 34 | padding-right:30px; |
---|
| 35 | font-size:11px; |
---|
| 36 | } |
---|
| 37 | |
---|
| 38 | tr.high { |
---|
| 39 | background-color:whitesmoke; |
---|
| 40 | } |
---|
| 41 | |
---|
| 42 | #footer { |
---|
| 43 | padding:2px; |
---|
| 44 | margin:10px; |
---|
| 45 | font-size:8pt; |
---|
| 46 | color:gray; |
---|
| 47 | } |
---|
| 48 | |
---|
| 49 | #footer a { |
---|
| 50 | color:gray; |
---|
| 51 | } |
---|
| 52 | |
---|
| 53 | a { |
---|
| 54 | color:black; |
---|
| 55 | } |
---|
| 56 | </style> |
---|
| 57 | </head> |
---|
| 58 | <body> |
---|
| 59 | <h1>XML Sitemap</h1> |
---|
| 60 | <div id="intro"> |
---|
| 61 | <p> |
---|
| 62 | 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 /> |
---|
| 63 | 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>. |
---|
| 64 | </p> |
---|
| 65 | </div> |
---|
| 66 | <div id="content"> |
---|
| 67 | <table cellpadding="5"> |
---|
| 68 | <tr style="border-bottom:1px black solid;"> |
---|
| 69 | <th>URL</th> |
---|
| 70 | <th>Priority</th> |
---|
| 71 | <th>Change Frequency</th> |
---|
| 72 | <th>LastChange</th> |
---|
| 73 | </tr> |
---|
| 74 | <xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/> |
---|
| 75 | <xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/> |
---|
| 76 | <xsl:for-each select="sitemap:urlset/sitemap:url"> |
---|
| 77 | <tr> |
---|
| 78 | <xsl:if test="position() mod 2 != 1"> |
---|
| 79 | <xsl:attribute name="class">high</xsl:attribute> |
---|
| 80 | </xsl:if> |
---|
| 81 | <td> |
---|
| 82 | <xsl:variable name="itemURL"> |
---|
| 83 | <xsl:value-of select="sitemap:loc"/> |
---|
| 84 | </xsl:variable> |
---|
| 85 | <a href="{$itemURL}"> |
---|
| 86 | <xsl:value-of select="sitemap:loc"/> |
---|
| 87 | </a> |
---|
| 88 | </td> |
---|
| 89 | <td> |
---|
| 90 | <xsl:value-of select="concat(sitemap:priority*100,'%')"/> |
---|
| 91 | </td> |
---|
| 92 | <td> |
---|
| 93 | <xsl:value-of select="concat(translate(substring(sitemap:changefreq, 1, 1),concat($lower, $upper),concat($upper, $lower)),substring(sitemap:changefreq, 2))"/> |
---|
| 94 | </td> |
---|
| 95 | <td> |
---|
| 96 | <xsl:value-of select="concat(substring(sitemap:lastmod,0,11),concat(' ', substring(sitemap:lastmod,12,5)))"/> |
---|
| 97 | </td> |
---|
| 98 | </tr> |
---|
| 99 | </xsl:for-each> |
---|
| 100 | </table> |
---|
| 101 | </div> |
---|
| 102 | </body> |
---|
| 103 | </html> |
---|
| 104 | </xsl:template> |
---|
| 105 | </xsl:stylesheet> |
---|