| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<xsl:stylesheet version="1.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 |
background-color:#cfebf7; |
| 20 |
border:1px #2580B2 solid; |
| 21 |
padding:5px 13px 5px 13px; |
| 22 |
margin:10px; |
| 23 |
} |
| 24 |
|
| 25 |
#intro p { |
| 26 |
line-height:16.8667px; |
| 27 |
} |
| 28 |
#intro strong { |
| 29 |
font-weight:normal; |
| 30 |
} |
| 31 |
|
| 32 |
td { |
| 33 |
font-size:11px; |
| 34 |
} |
| 35 |
|
| 36 |
th { |
| 37 |
text-align:left; |
| 38 |
padding-right:30px; |
| 39 |
font-size:11px; |
| 40 |
} |
| 41 |
|
| 42 |
tr.high { |
| 43 |
background-color:whitesmoke; |
| 44 |
} |
| 45 |
|
| 46 |
#footer { |
| 47 |
padding:2px; |
| 48 |
margin-top:10px; |
| 49 |
font-size:8pt; |
| 50 |
color:gray; |
| 51 |
} |
| 52 |
|
| 53 |
#footer a { |
| 54 |
color:gray; |
| 55 |
} |
| 56 |
|
| 57 |
a { |
| 58 |
color:black; |
| 59 |
} |
| 60 |
</style> |
| 61 |
</head> |
| 62 |
<body> |
| 63 |
<xsl:apply-templates></xsl:apply-templates> |
| 64 |
</body> |
| 65 |
</html> |
| 66 |
</xsl:template> |
| 67 |
|
| 68 |
|
| 69 |
<xsl:template match="sitemap:urlset"> |
| 70 |
<h1>XML Sitemap</h1> |
| 71 |
<div id="content"> |
| 72 |
<table cellpadding="5"> |
| 73 |
<tr style="border-bottom:1px black solid;"> |
| 74 |
<th>URL</th> |
| 75 |
</tr> |
| 76 |
<xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/> |
| 77 |
<xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/> |
| 78 |
<xsl:for-each select="./sitemap:url"> |
| 79 |
<tr> |
| 80 |
<xsl:if test="position() mod 2 != 1"> |
| 81 |
<xsl:attribute name="class">high</xsl:attribute> |
| 82 |
</xsl:if> |
| 83 |
<td> |
| 84 |
<xsl:variable name="itemURL"> |
| 85 |
<xsl:value-of select="sitemap:loc"/> |
| 86 |
</xsl:variable> |
| 87 |
<a href="{$itemURL}"> |
| 88 |
<xsl:value-of select="sitemap:loc"/> |
| 89 |
</a> |
| 90 |
</td> |
| 91 |
</tr> |
| 92 |
</xsl:for-each> |
| 93 |
</table> |
| 94 |
</div> |
| 95 |
</xsl:template> |
| 96 |
|
| 97 |
|
| 98 |
<xsl:template match="sitemap:sitemapindex"> |
| 99 |
<h1>XML Sitemap Index</h1> |
| 100 |
<div id="content"> |
| 101 |
<table cellpadding="5"> |
| 102 |
<tr style="border-bottom:1px black solid;"> |
| 103 |
<th>URL of sub-sitemap</th> |
| 104 |
<th>Last modified (GMT)</th> |
| 105 |
</tr> |
| 106 |
<xsl:for-each select="./sitemap:sitemap"> |
| 107 |
<tr> |
| 108 |
<xsl:if test="position() mod 2 != 1"> |
| 109 |
<xsl:attribute name="class">high</xsl:attribute> |
| 110 |
</xsl:if> |
| 111 |
<td> |
| 112 |
<xsl:variable name="itemURL"> |
| 113 |
<xsl:value-of select="sitemap:loc"/> |
| 114 |
</xsl:variable> |
| 115 |
<a href="{$itemURL}"> |
| 116 |
<xsl:value-of select="sitemap:loc"/> |
| 117 |
</a> |
| 118 |
</td> |
| 119 |
<td> |
| 120 |
<xsl:value-of select="sitemap:lastmod"/> |
| 121 |
</td> |
| 122 |
</tr> |
| 123 |
</xsl:for-each> |
| 124 |
</table> |
| 125 |
</div> |
| 126 |
</xsl:template> |
| 127 |
</xsl:stylesheet> |