address.xsl

来自「此程序为纯jsp实现通讯录功能」· XSL 代码 · 共 42 行

XSL
42
字号
<?xml version="1.0" encoding="GBK"?>
<!-- 编辑使用 XMLSpy v2006 U (http://www.altova.com) 由 any (any) -->
<!-- Edited with XML Spy v2007 (http://www.altova.com) -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="html" version="1.0" encoding="GBK" indent="yes"/>
	<xsl:template match="/">
		<div>
			<xsl:for-each select="/root/unit">
				 <a href="index.jsp?unit_id={@unit_id}&#38;expand={@expand}">
					<xsl:value-of select="@name"/> 
				</a>
				<br/>
				<xsl:variable name="unit_id">
					<xsl:value-of select="@unit_id"/>
				</xsl:variable>
				<xsl:for-each select="//root/unit/depart[@parent=$unit_id]">
				       <a href="index.jsp?unit_id={$unit_id}&#38;depart_id={@depart_id}&#38;expand={@expand}">
						<xsl:value-of select="@name"/>
					</a>
					<br/>
					<xsl:variable name="depart_id">
						<xsl:value-of select="@depart_id"/>
					</xsl:variable>
					<xsl:for-each select="//root/unit/depart/person[@depart_id=$depart_id][@unit_id=$unit_id]">
<div id="User" align="left" width="100%">
<div style="float:left;width:13%"> </div>
<div style="float:left;width:10%"><a href="userdetail.jsp?id={@id}" target="_blank"><xsl:value-of select="@name"/></a> </div>
<div style="float:left;width:27%"><xsl:value-of select="@post"/> </div>
<div style="float:left;width:9%"><xsl:value-of select="@mobile"/> </div>
<div style="float:left;width:11%"><xsl:value-of select="@phone"/> </div>
<div style="float:left;width:5%"><xsl:value-of select="@extension"/> </div>
<div style="float:left;width:18%"><a href="mailto:{@email}"><xsl:value-of select="@email"/></a> </div>
<div style="float:left;width:36%" align="right">TD测试号码:<xsl:value-of select="@tdno"/> </div>
</div>
						<br/>
					</xsl:for-each>
				</xsl:for-each>
			</xsl:for-each>
		</div>
	</xsl:template>
</xsl:stylesheet>

⌨️ 快捷键说明

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