Month: July 2009

通过XSLT处理所有的叶结点

抄自开源项目  “Dynamic Soap Portlet” <xsl:for-each select="./*"> <xsl:choose> <xsl:when test="count(./*) = 0 and count(./@*) = 0"> <dd style="display: list-item"><xsl:value-of select="." /></dd> </xsl:when> <xsl:otherwise> … </xsl:otherwise> </xsl:choose> </xsl:for-each> 另外还有人说, http://www.biglist.com/lists/xsl-list/archives/200010/msg00086.html If you mean elements with no element children (which is what your version is), then //*[not(*)] If all nodes that have no children at all (apart from …

通过XSLT处理所有的叶结点 Read More »