Holger Knublauch

DDR tables now suppressed if empty

1 -<div> 1 +<ui:call ui:template="{= ?template }" arg:report="{= ?report }">
2 - <hr /> 2 + <ui:if ui:condition="{= spr:rowCount(?rs) &gt; 0 }">
3 - <ui:setContext ui:queryGraph="&lt;http://www.reportinghub.no/ep/spin/ddr-tables&gt;"> 3 + <div>
4 - <h2>{= ui:label(?template) }</h2> 4 + <hr />
5 - </ui:setContext>
6 - <table class="ddrTable">
7 <ui:setContext ui:queryGraph="&lt;http://www.reportinghub.no/ep/spin/ddr-tables&gt;"> 5 <ui:setContext ui:queryGraph="&lt;http://www.reportinghub.no/ep/spin/ddr-tables&gt;">
8 - <tr class="ddrTR"> 6 + <h2>{= ui:label(?template) }</h2>
9 - <ui:forEach ui:resultSet="{#
10 - SELECT ?header
11 - WHERE {
12 - ?template rhspin:tableHeaders ?list .
13 - ?list &lt;http://jena.hpl.hp.com/ARQ/list#member&gt; ?header .
14 - }
15 - }">
16 - <th class="ddrTH"><ui:parse ui:str="{= html:encodeBRs(spif:replaceAll(?header, ' ', '&nbsp;')) }" /></th>
17 - </ui:forEach>
18 - </tr>
19 </ui:setContext> 7 </ui:setContext>
20 - <ui:call ui:template="{= ?template }" arg:report="{= ?report }"> 8 + <table class="ddrTable">
9 + <ui:setContext ui:queryGraph="&lt;http://www.reportinghub.no/ep/spin/ddr-tables&gt;">
10 + <tr class="ddrTR">
11 + <ui:forEach ui:resultSet="{#
12 + SELECT ?header
13 + WHERE {
14 + ?template rhspin:tableHeaders ?list .
15 + ?list &lt;http://jena.hpl.hp.com/ARQ/list#member&gt; ?header .
16 + }
17 + }">
18 + <th class="ddrTH"><ui:parse ui:str="{= html:encodeBRs(spif:replaceAll(?header, ' ', '&nbsp;')) }" /></th>
19 + </ui:forEach>
20 + </tr>
21 + </ui:setContext>
21 <ui:forEach ui:resultSet="{# SELECT ?row ?rowIndex WHERE { ?rs spr:rowIndices ?rowIndex } }"> 22 <ui:forEach ui:resultSet="{# SELECT ?row ?rowIndex WHERE { ?rs spr:rowIndices ?rowIndex } }">
22 <tr class="ddrTR"> 23 <tr class="ddrTR">
23 <ui:forEach ui:resultSet="{# SELECT ?cell WHERE { (?rs ?rowIndex) spr:rowCells (?cell ?cellIndex) } }"> 24 <ui:forEach ui:resultSet="{# SELECT ?cell WHERE { (?rs ?rowIndex) spr:rowCells (?cell ?cellIndex) } }">
...@@ -25,7 +26,8 @@ ...@@ -25,7 +26,8 @@
25 </ui:forEach> 26 </ui:forEach>
26 </tr> 27 </tr>
27 </ui:forEach> 28 </ui:forEach>
28 - </ui:call>
29 - </table>
30 - <br />
31 -</div>
...\ No newline at end of file ...\ No newline at end of file
29 + </table>
30 + <br />
31 + </div>
32 + </ui:if>
33 +</ui:call>
...\ No newline at end of file ...\ No newline at end of file
......