//全局变量
<xsl:variable name="temp_driving_type" select="WebPage/Data/OptReturnData[@OptRetName='GetEmpCarById']/OptRetData/NewDataSet/Table/driving_type"/> <select class="Input" name="driving_type" id="driving_type"> <xsl:for-each select="WebPage/Data/OptReturnData[@OptRetName='GetEmpCarTypeNames']/OptRetData/NewDataSet/Table"> <xsl:choose> <xsl:when test="contains($temp_driving_type,id)"> <option value="{id}" selected ="selected"> <xsl:value-of select="name"/> </option> </xsl:when> <xsl:otherwise> <option value="{id}"> <xsl:value-of select="name"/> </option> </xsl:otherwise> </xsl:choose> </xsl:for-each> </select> |
//全局参数
<?xml version="1.0" encoding="utf-8"?> <xsl:template match="/"> <xsl:for-each select="WebPage/Data/OptReturnData[@OptRetName='QueryEmpCarList']/OptRetData/NewDataSet/Rows"> </xsl:for-each> </xsl:template> |
个人博客地址:http://www.iwooto.com