Showing
1 changed file
with
16 additions
and
14 deletions
| ... | @@ -5,25 +5,27 @@ | ... | @@ -5,25 +5,27 @@ |
| 5 | <ui:setContext ui:queryGraph="<http://www.reportinghub.no/ep/spin/ddr-tables>"> | 5 | <ui:setContext ui:queryGraph="<http://www.reportinghub.no/ep/spin/ddr-tables>"> |
| 6 | <h2>{= ui:label(?template) }</h2> | 6 | <h2>{= ui:label(?template) }</h2> |
| 7 | </ui:setContext> | 7 | </ui:setContext> |
| 8 | - <table class="ddrTable"> | 8 | + <table class="ddrTable" letrs:hrs="{# |
| 9 | - <ui:setContext ui:queryGraph="<http://www.reportinghub.no/ep/spin/ddr-tables>"> | 9 | + SELECT ?header ?left |
| 10 | - <tr class="ddrTR"> | ||
| 11 | - <ui:forEach ui:resultSet="{# | ||
| 12 | - SELECT ?header | ||
| 13 | WHERE { | 10 | WHERE { |
| 14 | - ?template rhspin:tableHeaders ?list . | 11 | + GRAPH <http://www.reportinghub.no/ep/spin/ddr-tables> { |
| 15 | - ?list <http://jena.hpl.hp.com/ARQ/list#member> ?header . | 12 | + ?template rhspin:tableHeaders ?list . |
| 13 | + ?list <http://jena.hpl.hp.com/ARQ/list#member> ?str . | ||
| 14 | + BIND (fn:starts-with(?str, '*') AS ?left) . | ||
| 15 | + BIND (IF(?left, fn:substring(?str, 2), ?str) AS ?header) . | ||
| 16 | + } | ||
| 16 | } | 17 | } |
| 17 | }"> | 18 | }"> |
| 18 | - <th class="ddrTH" style="{= IF(fn:starts-with(?header, '*'), 'text-align: left', ?none) }" | 19 | + <tr class="ddrTR"> |
| 19 | - let:h="{= IF(fn:starts-with(?header, '*'), fn:substring(?header, 2), ?header) }"><ui:parse ui:str="{= html:encodeBRs(spif:replaceAll(?h, ' ', ' ')) }" /></th> | 20 | + <ui:forEach ui:resultSet="{= ?hrs }"> |
| 20 | - </ui:forEach> | 21 | + <th class="ddrTH" style="{= IF(?left, 'text-align: left', ?none) }" |
| 21 | - </tr> | 22 | + ><ui:parse ui:str="{= html:encodeBRs(spif:replaceAll(?header, ' ', ' ')) }" /></th> |
| 22 | - </ui:setContext> | 23 | + </ui:forEach> |
| 24 | + </tr> | ||
| 23 | <ui:forEach ui:resultSet="{# SELECT ?row ?rowIndex WHERE { ?rs spr:rowIndices ?rowIndex } }"> | 25 | <ui:forEach ui:resultSet="{# SELECT ?row ?rowIndex WHERE { ?rs spr:rowIndices ?rowIndex } }"> |
| 24 | <tr class="ddrTR"> | 26 | <tr class="ddrTR"> |
| 25 | - <ui:forEach ui:resultSet="{# SELECT ?cell WHERE { (?rs ?rowIndex) spr:rowCells (?cell ?cellIndex) } }"> | 27 | + <ui:forEach ui:resultSet="{# SELECT ?cell ?colIndex WHERE { (?rs ?rowIndex) spr:rowCells (?cell ?colIndex) } }"> |
| 26 | - <td class="ddrTD">{= ?cell }</td> | 28 | + <td class="ddrTD" style="{= IF(spr:cell(?hrs, ?colIndex, 1), 'text-align: left', 'text-align: center') }">{= ?cell }</td> |
| 27 | </ui:forEach> | 29 | </ui:forEach> |
| 28 | </tr> | 30 | </tr> |
| 29 | </ui:forEach> | 31 | </ui:forEach> | ... | ... |
-
Please register or login to post a comment