8,906
社区成员
发帖
与我相关
我的任务
分享
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/TR/REC-html40">
<xsl:template match="/">
<html>
<head>
<title>联系人 </title>
</head>
<body>
<xsl:apply-templates select="list"/>
</body>
</html>
</xsl:template>
<xsl:template match="list">
<TABLE border="1" cellspacing="0">
<CAPTION>联系人 </CAPTION >
<tr>
<th>姓名 </th>
<th>编号 </th>
<th>公司 </th>
<th>EMAIL </th>
</tr>
<xsl:for-each select="lianxiren">
<xsl:if test="name/text()='张扬'">
<tr>
<td>
<xsl:value-of select="name"/>
</td>
<td>
<xsl:value-of select="ID"/>
</td>
<td>
<xsl:value-of select="gongsi"/>
</td>
<td>
<xsl:value-of select="email"/>
</td>
</tr>
</xsl:if>
</xsl:for-each>
</TABLE>
<BR/>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="lianxiren.xsl"?>
<list>
<lianxiren>
<name>张扬</name>
<ID>001 </ID>
<gongsi>湖南广告 </gongsi>
<email>zhang@163.com </email>
</lianxiren>
<lianxiren>
<name>费翔 </name>
<ID>002 </ID>
<gongsi>湖南水利 </gongsi>
<email>fei@163.com </email>
</lianxiren>
<lianxiren>
<name>妖姬 </name>
<ID>003 </ID>
<gongsi>湖南城管 </gongsi>
<email>yao@163.com </email>
</lianxiren>
</list>