8,906
社区成员
发帖
与我相关
我的任务
分享
<xsl:if test="@id = 'name'">
<xsl:value-of disable-output-escaping="yes" select="@value"/>
<xsl:variable name="caption" select="@value"/>
</xsl:if>
<xsl:if test="@id = 'map'">
<a href="http://localhost/index_1.shtml?c={@value}&caption={$caption}">地图</a>
</xsl:if>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:apply-templates select="Infoset"/>
</xsl:template>
<xsl:template match="Infoset">
<xsl:variable name="pagecount" select="@pagecount"/>
<xsl:variable name="pagesize" select="@pagesize"/>
<xsl:variable name="pagenum" select="@pagenum"/>
<xsl:if test="$pagecount > 0">
<table border="0" width="720" cellpadding="0" cellspacing="0">
<xsl:for-each select="Info">
<tr>
<xsl:for-each select="Item">
<td class="bd1">
<xsl:if test="@id = 'name'">
<xsl:value-of disable-output-escaping="yes" select="@value"/>
<xsl:variable name="caption" select="@value"/>
</xsl:if>
</td>
<td class="bd1">
<xsl:if test="@id = 'address'">
<xsl:value-of disable-output-escaping="yes" select="@value"/>
</xsl:if>
</td>
<td class="bd1">
<xsl:if test="@id = 'phone'">
<xsl:value-of disable-output-escaping="yes" select="@value"/>
</xsl:if>
</td>
<td class="bd1">
<xsl:if test="@id = 'map_xy'">
<a href="http://ditu.beijing.cn/index_1.shtml?mapservice=highlight&c={@value}&caption={$caption}">查看地图>></a>
</xsl:if>
</td>
</xsl:for-each>
</tr>
</xsl:for-each>
</table>
<div style="text-align:center;margin:5px 80px 5px 0px;line-height:19px;height:19px; vertical-align:middle;">
<div style="float:right;cursor:pointer;">
[<span>
<xsl:attribute name="onclick">submitSearch(infosetid,pagesize,'1',condition)</xsl:attribute>
首页
</span>]
[<span>
<xsl:attribute name="onclick">submitSearch(infosetid,pagesize,'<xsl:value-of select = "$pagenum - 1" />',condition)</xsl:attribute>
上一页
</span>]
[<span>
<xsl:attribute name="onclick">submitSearch(infosetid,pagesize,'<xsl:value-of select = "$pagenum + 1" />',condition,'<xsl:value-of select = "$pagecount" />')</xsl:attribute>
下一页
</span>]
[<span>
<xsl:attribute name="onclick">submitSearch(infosetid,pagesize,'<xsl:value-of select = "$pagecount" />',condition)</xsl:attribute>
末页
</span>]
<xsl:value-of select="$pagenum"/>/<xsl:value-of select="$pagecount"/> 转到<input id="goPage" type="text" value="" style="width:20px;border:1xp solid gray;" />页 <img onclick="var go=submitSearch(infosetid,pagesize,document.getElementById('goPage').value,condition)" src="http://yljk.beijing.cn/upload/images/beijing_search_0004.gif" /></div>
</div>
</xsl:if>
<xsl:if test="$pagecount = 0">
对不起,没有查到数据!
</xsl:if>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="utf-8"?>
<Infoset id="ylfwjg" pagesize="30" pagenum="1" pagecount="11">
<Info url="http://www.map.cn/rcpage/ylfwjg/page/100001.shtml" url1="http://www.map.cn/rcpage/ylfwjg/page/100001.shtml">
<Item id="name" name="名称" value="延庆县延庆镇敬老院"/>
<Item id="area" name="所在区县" value="延庆县"/>
<Item id="address" name="地址" value="延庆县延庆镇王庄村"/>
<Item id="phone" name="电话" value="69173621"/>
<Item id="postcode" name="邮编" value="102100"/>
<Item id="xingzhi" name="性质" value="乡镇办"/>
<Item id="zbf" name="主办方" value="镇政府办"/>
<Item id="clsj" name="成立时间" value="2006年"/>
<Item id="fzr" name="负责人" value="赵伯顺"/>
<Item id="cws" name="床位数" value="100"/>
<Item id="url" name="网址" value="<a href=\'http://www.map.cn/map/maps.jsp?mapservice=highlight&data=255_BJCNYLY200810281\' target=_blank>查看地图>></a>"/>
<Item id="areabak" name="所属城区备份" value="73796"/>
<Item id="map_uid" name="地图UID" value="255_BJCNYLY200810281"/>
<Item id="map_xy" name="地图xy" value="BJCNYLY200810281"/>
<Item id="source" name="来源" value="北京市民政局"/>
<Item id="ID" name="" value="100001"/>
</Info>
<Info url="http://www.map.cn/rcpage/ylfwjg/page/100002.shtml" url1="http://www.map.cn/rcpage/ylfwjg/page/100002.shtml">
<Item id="name" name="名称" value="延庆县康庄镇敬老院"/>
<Item id="area" name="所在区县" value="延庆县"/>
<Item id="address" name="地址" value="延庆县康庄镇东二八七医院对面"/>
<Item id="phone" name="电话" value="69131017"/>
<Item id="postcode" name="邮编" value="102101"/>
<Item id="xingzhi" name="性质" value="乡镇办"/>
<Item id="zbf" name="主办方" value="镇政府办"/>
<Item id="clsj" name="成立时间" value="1979年"/>
<Item id="fzr" name="负责人" value="刘东祥"/>
<Item id="cws" name="床位数" value="106"/>
<Item id="url" name="网址" value="<a href=\'http://www.map.cn/map/maps.jsp?mapservice=highlight&data=255_BJCNYLY200810282\' target=_blank>查看地图>></a>"/>
<Item id="areabak" name="所属城区备份" value="73796"/>
<Item id="map_uid" name="地图UID" value="255_BJCNYLY200810282"/>
<Item id="map_xy" name="地图xy" value="BJCNYLY200810282"/>
<Item id="source" name="来源" value="北京市民政局"/>
<Item id="ID" name="" value="100002"/>
</Info>
</Infoset>
这是xml<xsl:if test="@id = 'map_xy'">
<a>
<xsl:attribute name="href">http://ditu.beijing.cn/index_1.shtml?mapservice=highlight&c={@value}&caption=<xsl:value-of select="parent::node()/Item[@id = 'name']/@value"/></xsl:attribute>查看地图>>
</a>
</xsl:if>