2012-02-09 77 views
0

分組結果我有傳回了大量的重複項目的XSLT轉換,如下所示: enter image description here重複行顯示爲的Muenchian在XSLT

Example report的剪斷後,第二類在底部顯示出來

這是它應該是這樣的: Proper report example

本報告的結構方式是:

 
Project 
    > Phases (formatted with light grey background) 
    > Categories (if any, formatted with light blue background) 
     > Deliverables (formatted with white background) 
     > Sub-deliverables 

層次結構起作用,但這只是太多。我不確定現階段發生了什麼事。我在XSLT 1.0中使用Muenchian方法。

回答

0

只有看起來奇怪的是這條線:

<xsl:apply-templates select="//Row[generate-id() = generate-id(key('Project-Phases', concat(ProjectNo, '|', Phase))[1][ProjectNo=current()/ProjectNo])]" mode="phase"/> 

[ProjectNo=current()/ProjectNo]部分不應該附加到關鍵。它應該在最後的]之後移動。