David Price

Merge branch 'master' into ddr-colalign

<ui:call ui:template="{= ?template }" arg:report="{= ?report }">
<ui:if ui:condition="{= spr:rowCount(?rs) &gt; 0 }">
<div>
<hr />
<ui:setContext ui:queryGraph="&lt;http://www.reportinghub.no/ep/spin/ddr-tables&gt;">
<h2>{= ui:label(?template) }</h2>
</ui:setContext>
<table class="ddrTable">
<ui:setContext ui:queryGraph="&lt;http://www.reportinghub.no/ep/spin/ddr-tables&gt;">
<tr class="ddrTR">
<ui:forEach ui:resultSet="{#
SELECT ?header
WHERE {
?template rhspin:tableHeaders ?list .
?list &lt;http://jena.hpl.hp.com/ARQ/list#member&gt; ?header .
}
}">
<th class="ddrTH"><ui:parse ui:str="{= html:encodeBRs(spif:replaceAll(?header, ' ', '&nbsp;')) }" /></th>
</ui:forEach>
</tr>
</ui:setContext>
<ui:forEach ui:resultSet="{# SELECT ?row ?rowIndex WHERE { ?rs spr:rowIndices ?rowIndex } }">
<tr class="ddrTR">
<ui:forEach ui:resultSet="{# SELECT ?cell WHERE { (?rs ?rowIndex) spr:rowCells (?cell ?cellIndex) } }">
<td class="ddrTD">{= ?cell }</td>
</ui:forEach>
</tr>
</ui:forEach>
</table>
<br />
</div>
</ui:if>
<ui:call ui:template="{= ?template }" arg:report="{= ?report }">
<ui:if ui:condition="{= spr:rowCount(?rs) &gt; 0 }">
<div>
<hr />
<ui:setContext ui:queryGraph="&lt;http://www.reportinghub.no/ep/spin/ddr-tables&gt;">
<h2>{= ui:label(?template) }</h2>
</ui:setContext>
<table class="ddrTable">
<ui:setContext ui:queryGraph="&lt;http://www.reportinghub.no/ep/spin/ddr-tables&gt;">
<tr class="ddrTR">
<ui:forEach ui:resultSet="{#
SELECT ?header
WHERE {
?template rhspin:tableHeaders ?list .
?list &lt;http://jena.hpl.hp.com/ARQ/list#member&gt; ?header .
}
}">
<th class="ddrTH" style="{= IF(fn:starts-with(?header, '*'), 'text-align: left', ?none) }"
let:h="{= IF(fn:starts-with(?header, '*'), fn:substring(?header, 2), ?header) }"><ui:parse ui:str="{= html:encodeBRs(spif:replaceAll(?h, ' ', '&nbsp;')) }" /></th>
</ui:forEach>
</tr>
</ui:setContext>
<ui:forEach ui:resultSet="{# SELECT ?row ?rowIndex WHERE { ?rs spr:rowIndices ?rowIndex } }">
<tr class="ddrTR">
<ui:forEach ui:resultSet="{# SELECT ?cell WHERE { (?rs ?rowIndex) spr:rowCells (?cell ?cellIndex) } }">
<td class="ddrTD">{= ?cell }</td>
</ui:forEach>
</tr>
</ui:forEach>
</table>
<br />
</div>
</ui:if>
</ui:call>
\ No newline at end of file
......