📄 photo.xsl
字号:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
<xsl:import href="top.xsl"/>
<xsl:import href="search.xsl"/>
<xsl:import href="foot.xsl"/>
<xsl:template match="/">
<html>
<head>
<title>Welcn Blog V1.0 XML+XSL+ASP</title>
<meta name="robots" content="all"/>
<meta name="author" content="Welcn Design"/>
<meta name="copyright" content="Welcn Blog"/>
<meta name="description" content="Welcn,Photo"/>
<meta name="keywords" content="Welcn,Photo"/>
<meta name="DC.title" content="Welcn Photo My life"/>
<link type="text/css" rel="stylesheet" href="images/css.css"/>
</head>
<body>
<div id="global_div">
<div id="top">
<xsl:apply-templates select="creatop/top"/>
</div>
<div class="clear"></div>
<div id="main">
<div class="left" id="photo_list">
<h1>Photo</h1>
<ul>
<xsl:apply-templates select="creatop/photo_list"/>
</ul>
</div>
<div class="right" id="tool">
<div id="search">
<div class="title">绔欑偣鎼滅储</div>
<ul>
<xsl:apply-templates select="creatop/search"/>
</ul>
</div>
<div id="cool">
<div class="title">鎴戠殑鎺ㄨ崘</div>
<ul>
<xsl:apply-templates select="creatop/cool"/>
</ul>
</div>
<div id="photo">
<div class="title">鎴戠殑鐓х墖</div>
<ul>
<xsl:apply-templates select="creatop/photo"/>
</ul>
</div>
</div>
</div>
<div class="clear"></div>
<div id="foot">
<xsl:apply-templates select="creatop/foot"/>
</div>
</div>
</body>
</html>
</xsl:template>
<!-- 鐓х墖鍒楄〃 -->
<xsl:template match="creatop/photo_list">
<xsl:for-each select="photo_list_item">
<li>
<a>
<xsl:attribute name="href">
display.asp?id=<xsl:value-of select="photo_list_url"/>
</xsl:attribute>
<img>
<xsl:attribute name="src">
upload/<xsl:value-of select="photo_list_img"/>
</xsl:attribute>
<xsl:attribute name="title">upload/<xsl:value-of select="photo_list_img"/></xsl:attribute></img>
</a>
</li>
</xsl:for-each>
</xsl:template>
<!-- BLOG 鎺ㄨ崘 -->
<xsl:template match="creatop/cool">
<xsl:for-each select="cool_item">
<li>
<a >
<xsl:attribute name="href">
display.asp?id=<xsl:value-of select="cool_id"/>
</xsl:attribute>
<xsl:value-of select="cool_title"/>
</a>
</li>
</xsl:for-each>
</xsl:template>
<!-- 鎺ㄨ崘鐓х墖 -->
<xsl:template match="creatop/photo">
<xsl:for-each select="photo_item">
<li>
<a >
<xsl:attribute name="href">
display.asp?id=<xsl:value-of select="photo_url"/>
</xsl:attribute>
<img>
<xsl:attribute name="src">
upload/<xsl:value-of select="photo_img"/>
</xsl:attribute>
<xsl:attribute name="title">upload/<xsl:value-of select="photo_img"/></xsl:attribute></img>
</a>
</li>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -