Life is Good.

Enhance Tech and English
随笔 - 65, 文章 - 20, 评论 - 21, 引用 - 0
数据加载中……

XLS 提取含有其中某个相同子节点的所有父节点

Two mothods:
1.
<
xsl:for-each select="//Parent[generate-id(.)=generate-id(key('testKey',child))]">

<xsl:for-each select="key('testKey',child)">


2.

<xsl:if test="not(preceding-sibling::node()[child=string(current()/child)])">

<xsl:call-template name="getFiles">

<xsl:with-param name="currentChange" select="current()/child" />

</xsl:call-template>


<xsl:template name="getFiles">

<xsl:param name="currentChange" />

<ol>

<xsl:for-each select="Parent[child=$currentChange]">

<!--Skip duplicate files in the same changelist-->

<xsl:if test="not (preceding-sibling::node()[(child=$currentChange) and (filename=string(current()/filename)) and (project=string(current()/project))])">


。。。

posted on 2009-05-14 10:18 Mike Song 阅读(243) 评论(0)  编辑 收藏 引用


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理