ex8-5.xsl

来自「< xml网页开发实例开发>>一书的全部源代码和实例」· XSL 代码 · 共 46 行

XSL
46
字号
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XML Spy v3.5 (http://www.xmlspy.com) by  () -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="/">
			<html>
			<body>
				<table border="2" bgcolor="yellow">
					<tr>
						<th>闃熷悕</th>
						<th>鍦哄湴</th>
					</tr>
					<xsl:for-each select="CnGame/Opponent">
						<tr>
							<th>
								<xsl:value-of select="TeamName"/>
							</th>
							<xsl:choose>
						          <xsl:when test="Place='闊╁浗姹夊煄'">
								            <td bgcolor="#ff0000">
								             <xsl:value-of select="Place"/>
								            </td>
						          </xsl:when>
						          <xsl:when test="Place='闊╁浗鍏夊窞'">
								            <td bgcolor="#0000ff">
								             <xsl:value-of select="Place"/>
								             <xsl:text disable-output-escaping="no">fdsa</xsl:text>
								            </td>
						     </xsl:when>

						          <xsl:otherwise>
								            <td><xsl:value-of select="Place"/></td>
						          </xsl:otherwise>
						        </xsl:choose>

							<!--<th>
								<xsl:value-of select="Place"/>
							</th>
							-->
						</tr>
					</xsl:for-each>
				</table>
			</body>
		</html>
	</xsl:template>
</xsl:stylesheet>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?