<statisticItems>
<statisticItem id="1" frontendGroupId="2336" caseId="50264" />
<statisticItem id="2" frontendGroupId="2336" caseId="50264" />
<statisticItem id="3" frontendGroupId="2337" caseId="50265" />
<statisticItem id="4" frontendGroupId="2337" caseId="50266" />
<statisticItem id="5" frontendGroupId="2337" caseId="50266" />
</statisticItems>
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:key name="statistic-by-frontendGroupId" match="statisticItem" use="@frontendGroupId" />
<xsl:for-each select="statisticItems/statisticItem[count(.|key('statistic-by-frontendGroupId', @frontendGroupId)[1]) = 1]">
<xsl:value-of select="@frontendGroupId"/>
</xsl:for-each>
私が行ったことは、すべてのdistend frontendGroupIdsを通過することです。私が今したいことは、各distend frontendGroupIdのすべてのdistict caseIdsのカウントを行うことですが、私はその作業を行うことはできません。誰かがここで私を助けることができますPLZ?XSlt個別の選択/グループ
「何か私は混乱していることが分かりましたが、それは試してみる価値がありません」なんて奇妙な態度。 – Tomalak
あなたは正しく私の文法が間違っています - 私は試してみました - 私はサーバーレベルをグループ化する必要がありました(正しく覚えていれば4または5)。私はそれを働かせましたが、キーの定義は非常に混乱していました。特に、入れ子にされたグループが深くなるときです。しかし、私が上に示してみた2つのパスの方法は、はるかに説明して読みやすくなります – Adrian
私の答えを読むことをお勧めします:http:// stackoverflow。com/questions/948218/xslt-3-level-grouping-on-attributes - 多分それはあなたに役立ちます:-) – Tomalak