导航

msxsl:node-set function

Posted on 2007-11-13 10:56  鸡尾虾的壳  阅读(283)  评论(0编辑  收藏  举报
MS内建的Custom Xpath. 功能:把树形XML段转化为节点集。
例子:
    <xsl:variable name="NoPhoneList">
        <xsl:for-each select="./ConditionalSource">
            <a>
                <xsl:choose>
                     <xsl:when test="contains(string(./type/text()),$param1)">
                        <xsl:value-of select="'0'"/>
                     </xsl:when>
                     <xsl:otherwise>
                          <xsl:value-of select="'1'"/>
                     </xsl:otherwise>
                 </xsl:choose>
            </a>
        </xsl:for-each>
     </xsl:variable>

msxsl:node-set($NoPhoneList)的结果就是一个节点集变量。如:msxsl:node-set($NoPhoneList)/a