category.xsl
Author
Zhou Renjian
Create@
2005-03-20 17:05
<?xml version="1.0" encoding="gb2312"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="gb2312"/>
<xsl:template match="/folder">
<xsl:choose>
<xsl:when test="@index != ''">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
<!--
<xsl:element name="meta">
<xsl:attribute name="http-equiv">Refresh</xsl:attribute>
<xsl:attribute name="content">0; url=<xsl:value-of select="@index"/></xsl:attribute>
</xsl:element>
-->
<title>Page to be redirected--wHizz eBooks</title>
</head>
<body>
<center>
Page has been redirected to
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="@index"/>
</xsl:attribute>
<xsl:value-of select="@index"/>
</xsl:element>
</center>
<script type="text/vbscript" src="../encoding.vbs"></script>
<script type="text/javascript">
try {
var url = URLEncoding("<xsl:value-of select="@index"/>");
window.location.replace(url);
/*
document.body.style.margin = 0;
document.body.style.padding = 0;
document.body.innerHTML = "<iframe src=\"" + url + "\" style=\"width:100%;height:100%;\"></iframe>";
*/
} catch (e) {
window.location.replace("<xsl:value-of select="@index"/>");
}
</script>
</body>
</html>
</xsl:when>
<xsl:otherwise>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
<title><xsl:value-of select="/folder/@name"/>--eBooks Keep You wHizz</title>
<link rel="stylesheet" href="/css/index.whizz.css" type="text/css"/>
<link rel="shortcut icon" href="/zmosicon.ico" type="image/x-icon"/>
<style>
li {
line-height:1.75em;
}
.booklist {
font-family:Arial, sans-serif;
font-size:10pt;
margin-left:22px;
margin-right:22px;
border: 1px solid #8b0000;
}
.category {
padding-left:12px;
padding-right:12px;
border:1px solid #c0c0d7;
background-color:#ddddfd;
line-height:1.2em;
margin-bottom:0.25em;
margin-top:0.25em;
padding-top:0.1em;
}
.bookmark {
display:none;
}
* html .bookmark {
display:inline;
}
</style>
</head>
<body id="wBody" class="wbody">
<div id="wHizzBody" style="width:100%;"> <!-- fixed the page to no less 800px width -->
<div class="logoblock">
<div class="logowhitebg"></div>
<div class="logotext">wHizz ideas</div>
</div>
<div class="horizontalseperator"></div>
<div class="goldbox"></div>
<div class="booklist">
<ul>
<xsl:if test="@parent != ''">
<li style="list-style:none;margin-bottom:1em;">
<img src="../up.gif" style="margin-right:4px;" height="16" width="16" alt="Up"/>
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="concat('../', substring(@parent, 10, 2))"/>
<xsl:value-of select="concat('/', @parent)"/>
</xsl:attribute>
<nobr>Up to Parent</nobr>
</xsl:element>
<img src="../root.gif" style="margin-left:32px;margin-right:4px;" height="16" width="16" alt="Root"/>
<a href="../00/category-0001.xml"><nobr>Up to Root</nobr></a>
<img class="bookmark" src="../bookmark.gif" style="margin-left:32px;margin-right:4px;" height="16" width="16" alt="Bookmark"/>
<a class="bookmark" href="#" onclick="javascript:window.external.AddFavorite(window.location, document.title)"><nobr>Bookmark Me</nobr></a>
</li>
</xsl:if>
<li style="list-style-image:url('../current.gif');">
<nobr class="category">Current Category: <strong><xsl:value-of select="@name"/></strong></nobr>
</li>
<xsl:for-each select="folder">
<li style="list-style-image:url('../folder.gif');">
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="concat('../', substring(@url, 10, 2))"/>
<xsl:value-of select="concat('/', @url)"/>
</xsl:attribute>
<nobr><xsl:value-of select="@name"/></nobr>
</xsl:element>
</li>
</xsl:for-each>
<xsl:for-each select="file">
<li style="list-style-image:url('../file.gif');">
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="@url"/>
</xsl:attribute>
<nobr><xsl:value-of select="@name"/></nobr>
</xsl:element>
</li>
</xsl:for-each>
</ul>
<div style="text-align:right;padding-right:8px;padding-bottom:8px;">
"wHizz eBooks" powered by resources of<br/>
<a href="http://comic.sjtu.edu.cn/booklist.asp">comic.sjtu.edu.cn <strong>ebooks</strong></a>
</div>
</div>
<div style="height:8px;overflow:hidden;">
<div class="bottomhorizontalseperator"></div>
<div class="h1" style="margin-top:1px;width:100%;"></div>
</div>
<div class="footer">
<span class="floatright" style="width:0em;"></span>
<span class="floatright" style="width:6em;"></span>
<span class="floatright" style="width:12em;"></span>
<span class="floatright" style="width:18em;color:#bcbcfc;">2005/1/22 by jozz  </span>
<span class="floatright" style="width:24em;text-align:center;color:#9c9cfc;" id="slogan">iDeas wHizz</span>
<span class="floatright" style="width:30em;color:#9c9cfc;" id="copyright">Copyright <a class="link" href="http://www.whizzideas.com" style="color:#9c9cfc;"><strong>whizzideas.com</strong></a> 2004, 2005            </span>
<span class="floatright" style="width:36em;"></span>
<a class="link" href="/whizznotes/xhtml/1029.html">Thoughts</a><br/>
<a class="link" href="/whizznotes/xhtml/1708.html">wHizz iDeas</a><br/>
<a class="link" href="/whizznotes/xhtml/1479.html">Sex Jokes</a><br/>
<a class="link" href="/whizznotes/xhtml/1235.html">BBS Jokes</a><br/>
<a class="link" href="/whizznotes/xhtml/888.html">About Me</a><br/>
<a class="link" href="/index.html">wHizz Home</a><br/>
<a class="link" href="/whizzebooks/index.html">wHizz eBooks</a>
</div>
<span class="notice" style="position:relative;top:-8em;">
<strong style="color:#8b0000;">Copyright Notice</strong>:<br/>
You are free to copy the upper article but you <strong>MUST</strong> keep<br/>
content of the article, the author name<br/>
and the original posted URL<br/>
<strong>unchanged</strong>.
</span>
<!-- Delayed the loading logo here, for the less waiting seconds -->
<div class="logoblock2">
<a href="http://www.sjtu.edu.cn" title="sjtu.edu.cn"><img src="/images/sjtu.logo.gif" alt="SJTU Logo" width="85" height="77" class="logoborder"/></a>
</div>
<!--Bricks-->
<div class="b0" style="left:300px;"></div>
<div class="brick" style="left:315px;top:60px;"></div>
<div class="b0" style="left:332px;"></div>
<div class="b0" style="left:473px;"></div>
<div class="b0" style="left:507px;"></div>
<div class="b0" style="left:537px;"></div>
<div class="brick" style="left:525px;top:60px;"></div>
<div class="brick" style="left:490px;top:60px;"></div>
<div class="brick" style="left:482px;top:40px;"></div>
<div class="b0" style="left:632px;"></div>
<div class="b0" style="left:712px;"></div>
</div>
<div id="ruCornerBox" class="validatorcorner">
<div style="float:right;">
<a href="http://validator.w3.org/check?uri=referer"><img style="border:0;width:88px;height:31px"
src="/images/valid-xhtml10.png"
alt="Valid XHTML 1.0!" height="31" width="88" / ></a>
</div>
<div style="float:right;">
<a href="http://jigsaw.w3.org/css-validator/check/referer"><img style="border:0;width:88px;height:31px"
src="/images/vcss.png"
alt="Valid CSS!" height="31" width="88" / ></a>
</div>
</div>
</body>
</html>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>