dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15111
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5329: merged with dxf2: fixes to html, and it now has a simple index page
Merge authors:
Bob Jolliffe bobjolliffe@xxxxxxxxx
Morten Olav Hansen (mortenoh)
------------------------------------------------------------
revno: 5329 [merge]
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-12-08 10:03:18 +0100
message:
merged with dxf2: fixes to html, and it now has a simple index page
added:
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicatorType.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/resource.xsl
modified:
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/category.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/categoryCombo.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/categoryOption.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/categoryOptionCombo.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/chart.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/dataElement.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/dataElementGroup.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/dataElementGroupSet.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/dataSet.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/html-wrapper.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/identifiable-row.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicator.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicatorGroup.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicatorGroupSet.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/list.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/map.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/model2html.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/organisationUnit.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/organisationUnitGroup.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/organisationUnitGroupSet.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/users.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/list.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/model2fop.xsl
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/category.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/category.xsl 2011-12-07 12:27:51 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/category.xsl 2011-12-07 16:03:19 +0000
@@ -19,17 +19,15 @@
</tr>
</table>
- <xsl:apply-templates select="d:categoryOptions"/>
+ <xsl:apply-templates select="d:categoryOptions" mode="short"/>
</div>
</xsl:template>
- <xsl:template match="d:categoryOptions">
- <xsl:if test="count(child::*) > 0">
- <h3>CategoryOptions</h3>
- <table border="1" class="categoryOptions">
- <xsl:apply-templates select="child::*" mode="row"/>
- </table>
- </xsl:if>
+ <xsl:template match="d:category" mode="short">
+ <h3>Category</h3>
+ <table border="1" class="category">
+ <xsl:apply-templates select="." mode="row"/>
+ </table>
</xsl:template>
</xsl:stylesheet>
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/categoryCombo.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/categoryCombo.xsl 2011-12-07 12:27:51 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/categoryCombo.xsl 2011-12-07 16:03:19 +0000
@@ -19,19 +19,17 @@
</tr>
</table>
- <xsl:apply-templates select="d:optionCombos|d:categories"/>
+ <xsl:apply-templates select="d:optionCombos|d:categories" mode="short"/>
</div>
</xsl:template>
- <xsl:template match="d:optionCombos">
- <xsl:if test="count(child::*) > 0">
- <h3>OptionCombos</h3>
- <table border="1" class="optionCombos">
- <xsl:apply-templates select="child::*" mode="row"/>
- </table>
- </xsl:if>
+ <xsl:template match="d:categoryCombo" mode="short">
+ <h3>CategoryCombo</h3>
+ <table border="1" class="categoryCombo">
+ <xsl:apply-templates select="." mode="row"/>
+ </table>
</xsl:template>
-
+
<xsl:template match="d:categories">
<xsl:if test="count(child::*) > 0">
<h3>Categories</h3>
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/categoryOption.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/categoryOption.xsl 2011-12-07 12:27:51 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/categoryOption.xsl 2011-12-07 16:03:19 +0000
@@ -19,24 +19,17 @@
</tr>
</table>
- <xsl:apply-templates select="d:categoryOptionCombos|d:category"/>
+ <xsl:apply-templates select="d:category|d:categoryOptionCombos" mode="short"/>
</div>
</xsl:template>
- <xsl:template match="d:category">
- <h3>Category</h3>
- <table border="1" class="category">
- <xsl:apply-templates select="child::*" mode="row"/>
- </table>
- </xsl:template>
-
- <xsl:template match="d:categoryOptionCombos">
+ <xsl:template match="d:categoryOptions" mode="short">
<xsl:if test="count(child::*) > 0">
- <h3>CategoryOptionCombos</h3>
- <table border="1" class="categoryOptionCombos">
+ <h3>CategoryOptions</h3>
+ <table border="1" class="categoryOptions">
<xsl:apply-templates select="child::*" mode="row"/>
</table>
</xsl:if>
</xsl:template>
-
+
</xsl:stylesheet>
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/categoryOptionCombo.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/categoryOptionCombo.xsl 2011-12-07 12:27:51 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/categoryOptionCombo.xsl 2011-12-07 16:03:19 +0000
@@ -19,24 +19,26 @@
</tr>
</table>
- <xsl:apply-templates select="d:categoryOptions|d:categoryCombo"/>
+ <xsl:apply-templates select="d:categoryCombo|d:categoryOptions" mode="short"/>
</div>
</xsl:template>
- <xsl:template match="d:categoryCombo">
- <h3>CategoryCombo</h3>
- <table border="1" class="categoryCombo">
- <xsl:apply-templates select="child::*" mode="row"/>
- </table>
- </xsl:template>
-
- <xsl:template match="d:categoryOptions">
- <xsl:if test="count(child::*) > 0">
- <h3>CategoryOptions</h3>
- <table border="1" class="categoryOptions">
- <xsl:apply-templates select="child::*" mode="row"/>
- </table>
- </xsl:if>
- </xsl:template>
-
+ <xsl:template match="d:categoryOptionCombos" mode="short">
+ <xsl:if test="count(child::*) > 0">
+ <h3>CategoryOptionCombos</h3>
+ <table border="1" class="categoryOptionCombos">
+ <xsl:apply-templates select="child::*" mode="row"/>
+ </table>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="d:optionCombos" mode="short">
+ <xsl:if test="count(child::*) > 0">
+ <h3>OptionCombos</h3>
+ <table border="1" class="optionCombos">
+ <xsl:apply-templates select="child::*" mode="row"/>
+ </table>
+ </xsl:if>
+ </xsl:template>
+
</xsl:stylesheet>
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/chart.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/chart.xsl 2011-12-06 20:38:31 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/chart.xsl 2011-12-07 16:03:19 +0000
@@ -1,101 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:d="http://dhis2.org/schema/dxf/2.0"
- version="1.0">
-
- <xsl:template match="d:chart">
- <div class="chart">
- <h2>Chart: <xsl:value-of select="@name"/> </h2>
- <a href="{@link}.png"><img src="{@link}.png" style="border-style:solid; border-width: 1px; padding: 5px;" /></a>
-
- <h3>Details</h3>
-
- <table border="1">
- <tr>
- <td>ID</td>
- <td> <xsl:value-of select="@id"/> </td>
- </tr>
- <tr>
- <td>Last Updated</td>
- <td> <xsl:value-of select="@lastUpdated"/> </td>
- </tr>
- <tr>
- <td>Dimension</td>
- <td> <xsl:value-of select="d:dimension"/> </td>
- </tr>
- <tr>
- <td>Hide legend</td>
- <td> <xsl:value-of select="d:hideLegend"/> </td>
- </tr>
- <tr>
- <td>Hide subtitle</td>
- <td> <xsl:value-of select="d:hideSubtitle"/> </td>
- </tr>
- <tr>
- <td>Horizontal Pilot Orientation</td>
- <td> <xsl:value-of select="d:horizontalPlotOrientation"/> </td>
- </tr>
- <tr>
- <td>Regression</td>
- <td> <xsl:value-of select="d:regression"/> </td>
- </tr>
- <tr>
- <td>Size</td>
- <td> <xsl:value-of select="d:size"/> </td>
- </tr>
- <tr>
- <td>Target line</td>
- <td> <xsl:value-of select="d:targetLine"/> </td>
- </tr>
- <tr>
- <td>Target line label</td>
- <td> <xsl:value-of select="d:targetLineLabel"/> </td>
- </tr>
- <tr>
- <td>Type</td>
- <td> <xsl:value-of select="d:type"/> </td>
- </tr>
- <tr>
- <td>User organisation unit</td>
- <td> <xsl:value-of select="d:userOrganisationUnit"/> </td>
- </tr>
- <tr>
- <td>Vertical labels</td>
- <td> <xsl:value-of select="d:verticalLabels"/> </td>
- </tr>
- </table>
-
- <xsl:apply-templates select="d:organisationUnits|d:dataElements|d:indicators"/>
-
- </div>
- </xsl:template>
-
- <xsl:template match="d:organisationUnits">
- <xsl:if test="count(child::*) > 0">
- <h3>OrganisationUnits</h3>
- <table border="1">
- <xsl:apply-templates select="child::*" mode="row"/>
- </table>
- </xsl:if>
- </xsl:template>
-
- <xsl:template match="d:dataElements">
- <xsl:if test="count(child::*) > 0">
- <h3>DataElements</h3>
- <table border="1">
- <xsl:apply-templates select="child::*" mode="row"/>
- </table>
- </xsl:if>
- </xsl:template>
-
- <xsl:template match="d:indicators">
- <xsl:if test="count(child::*) > 0">
- <h3>Indicators</h3>
- <table border="1">
- <xsl:apply-templates select="child::*" mode="row"/>
- </table>
- </xsl:if>
- </xsl:template>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:d="http://dhis2.org/schema/dxf/2.0"
+ version="1.0">
+
+ <xsl:template match="d:chart">
+ <div class="chart">
+ <h2>Chart: <xsl:value-of select="@name"/> </h2>
+ <a href="{@link}.png"><img src="{@link}.png" style="border-style:solid; border-width: 1px; padding: 5px;" /></a>
+
+ <h3>Details</h3>
+
+ <table border="1">
+ <tr>
+ <td>ID</td>
+ <td> <xsl:value-of select="@id"/> </td>
+ </tr>
+ <tr>
+ <td>Last Updated</td>
+ <td> <xsl:value-of select="@lastUpdated"/> </td>
+ </tr>
+ <tr>
+ <td>Dimension</td>
+ <td> <xsl:value-of select="d:dimension"/> </td>
+ </tr>
+ <tr>
+ <td>Hide legend</td>
+ <td> <xsl:value-of select="d:hideLegend"/> </td>
+ </tr>
+ <tr>
+ <td>Hide subtitle</td>
+ <td> <xsl:value-of select="d:hideSubtitle"/> </td>
+ </tr>
+ <tr>
+ <td>Horizontal Pilot Orientation</td>
+ <td> <xsl:value-of select="d:horizontalPlotOrientation"/> </td>
+ </tr>
+ <tr>
+ <td>Regression</td>
+ <td> <xsl:value-of select="d:regression"/> </td>
+ </tr>
+ <tr>
+ <td>Size</td>
+ <td> <xsl:value-of select="d:size"/> </td>
+ </tr>
+ <tr>
+ <td>Target line</td>
+ <td> <xsl:value-of select="d:targetLine"/> </td>
+ </tr>
+ <tr>
+ <td>Target line label</td>
+ <td> <xsl:value-of select="d:targetLineLabel"/> </td>
+ </tr>
+ <tr>
+ <td>Type</td>
+ <td> <xsl:value-of select="d:type"/> </td>
+ </tr>
+ <tr>
+ <td>User organisation unit</td>
+ <td> <xsl:value-of select="d:userOrganisationUnit"/> </td>
+ </tr>
+ <tr>
+ <td>Vertical labels</td>
+ <td> <xsl:value-of select="d:verticalLabels"/> </td>
+ </tr>
+ </table>
+
+ <xsl:apply-templates select="d:organisationUnits|d:dataElements|d:indicators" mode="short"/>
+
+ </div>
+ </xsl:template>
</xsl:stylesheet>
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/dataElement.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/dataElement.xsl 2011-12-07 12:27:51 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/dataElement.xsl 2011-12-07 16:03:19 +0000
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:d="http://dhis2.org/schema/dxf/2.0"
- >
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:d="http://dhis2.org/schema/dxf/2.0"
+ >
<xsl:template match="d:dataElement">
<div class="dataElement">
@@ -46,33 +46,17 @@
<td> <xsl:value-of select="d:domainType" /> </td>
</tr>
</table>
- <xsl:apply-templates select="d:categoryCombo|d:dataElementGroups|d:dataSets"/>
+ <xsl:apply-templates select="d:categoryCombo|d:dataElementGroups|d:dataSets" mode="short"/>
</div>
</xsl:template>
-
- <xsl:template match="d:categoryCombo">
- <h3>CategoryCombo</h3>
- <table border="1" class="categoryCombo">
- <xsl:apply-templates select="child::*" mode="row"/>
- </table>
- </xsl:template>
-
- <xsl:template match="d:dataElementGroups">
- <xsl:if test="count(child::*) > 0">
- <h3>DataElementGroups</h3>
- <table border="1" class="dataElementGroups">
- <xsl:apply-templates select="child::*" mode="row"/>
- </table>
- </xsl:if>
- </xsl:template>
-
- <xsl:template match="d:dataSets">
- <xsl:if test="count(child::*) > 0">
- <h3>DataSets</h3>
- <table border="1" class="dataSets">
- <xsl:apply-templates select="child::*" mode="row"/>
- </table>
- </xsl:if>
- </xsl:template>
-
+
+ <xsl:template match="d:dataElements" mode="short">
+ <xsl:if test="count(child::*) > 0">
+ <h3>DataElements</h3>
+ <table border="1" class="dataElements">
+ <xsl:apply-templates mode="row"/>
+ </table>
+ </xsl:if>
+ </xsl:template>
+
</xsl:stylesheet>
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/dataElementGroup.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/dataElementGroup.xsl 2011-12-06 20:59:32 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/dataElementGroup.xsl 2011-12-07 16:03:19 +0000
@@ -23,17 +23,17 @@
</tr>
</table>
- <xsl:apply-templates select="d:dataElements"/>
+ <xsl:apply-templates select="d:dataElements" mode="short"/>
</div>
</xsl:template>
- <xsl:template match="d:dataElements">
+ <xsl:template match="d:dataElementGroups" mode="short">
<xsl:if test="count(child::*) > 0">
- <h3>DataElements</h3>
- <table border="1" class="dataElements">
+ <h3>DataElementGroups</h3>
+ <table border="1" class="dataElementGroups">
<xsl:apply-templates select="child::*" mode="row"/>
</table>
</xsl:if>
</xsl:template>
-
+
</xsl:stylesheet>
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/dataElementGroupSet.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/dataElementGroupSet.xsl 2011-12-06 20:59:32 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/dataElementGroupSet.xsl 2011-12-07 16:03:19 +0000
@@ -23,17 +23,8 @@
</tr>
</table>
- <xsl:apply-templates select="d:dataElementGroups"/>
+ <xsl:apply-templates select="d:dataElementGroups" mode="short"/>
</div>
</xsl:template>
- <xsl:template match="d:dataElementGroups">
- <xsl:if test="count(child::*) > 0">
- <h3>DataElement Groups</h3>
- <table border="1" class="dataElementGroups">
- <xsl:apply-templates select="child::*" mode="row"/>
- </table>
- </xsl:if>
- </xsl:template>
-
</xsl:stylesheet>
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/dataSet.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/dataSet.xsl 2011-12-06 20:30:07 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/dataSet.xsl 2011-12-07 16:03:19 +0000
@@ -33,36 +33,18 @@
</table>
- <xsl:apply-templates select="d:dataElements|d:indicators|d:sources" />
+ <xsl:apply-templates select="d:dataElements|d:indicators|d:organisationUnits" mode="short" />
</div>
</xsl:template>
-
- <xsl:template match="d:dataElements">
- <xsl:if test="count(child::*) > 0">
- <h3>DataElements</h3>
- <table border="1" class="dataElements">
- <xsl:apply-templates mode="row"/>
- </table>
- </xsl:if>
- </xsl:template>
-
- <xsl:template match="d:indicators">
- <xsl:if test="count(child::*) > 0">
- <h3>Indicators</h3>
- <table border="1" class="indicator">
- <xsl:apply-templates select="child::*" mode="row"/>
- </table>
- </xsl:if>
- </xsl:template>
-
- <xsl:template match="d:sources">
- <xsl:if test="count(child::*) > 0">
- <h3>OrganisationUnits</h3>
- <table border="1" class="sources">
- <xsl:apply-templates select="child::*" mode="row"/>
- </table>
- </xsl:if>
- </xsl:template>
-
+
+ <xsl:template match="d:dataSets" mode="short">
+ <xsl:if test="count(child::*) > 0">
+ <h3>DataSets</h3>
+ <table border="1" class="dataSets">
+ <xsl:apply-templates select="child::*" mode="row"/>
+ </table>
+ </xsl:if>
+ </xsl:template>
+
</xsl:stylesheet>
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/html-wrapper.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/html-wrapper.xsl 2011-12-06 13:34:35 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/html-wrapper.xsl 2011-12-07 14:04:35 +0000
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:d="http://dhis2.org/schema/dxf/2.0"
- >
-
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:d="http://dhis2.org/schema/dxf/2.0"
+ >
+
<xsl:output method="html" doctype-system="about:legacy-compat"/>
<xsl:template match="/">
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/identifiable-row.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/identifiable-row.xsl 2011-12-06 20:45:22 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/identifiable-row.xsl 2011-12-07 14:04:35 +0000
@@ -1,40 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns="http://www.w3.org/1999/xhtml" xmlns:d="http://dhis2.org/schema/dxf/2.0">
-
- <xsl:template match="*" mode="row">
+ xmlns="http://www.w3.org/1999/xhtml" xmlns:d="http://dhis2.org/schema/dxf/2.0">
+
+ <xsl:template match="*" mode="row">
+ <tr>
+ <td> <xsl:value-of select="@name"/> </td>
+ <td> <a href="{@link}">html</a> </td>
+ <td> <a href="{@link}.xml">xml</a> </td>
+ <td> <a href="{@link}.json">json</a> </td>
+ <td> <a href="{@link}.jsonp">jsonp</a> </td>
+ <td><a href="{@link}.pdf">pdf</a> </td>
+ </tr>
+ </xsl:template>
+
+ <!-- special case - TODO handle this better -->
+ <!-- <xsl:template match="d:parent" mode="row">
<tr>
- <td> <xsl:value-of select="@name"/> </td>
- <td> <a href="{@link}">html</a> </td>
- <td> <a href="{@link}.xml">xml</a> </td>
- <td> <a href="{@link}.json">json</a> </td>
- <td> <a href="{@link}.jsonp">jsonp</a> </td>
- <td><a href="{@link}.pdf">pdf</a> </td>
+ <td>
+ <xsl:value-of select="@name"/>
+ </td>
+ <td>
+ <a href="{@link}">html</a>
+ </td>
+ <td>
+ <a href="{@link}.xml">xml</a>
+ </td>
+ <td>
+ <a href="{@link}.json">json</a>
+ </td>
+ <td>
+ <a href="{@link}.jsonp">jsonp</a>
+ </td>
+ <td>
+ <a href="{@link}.pdf">pdf</a>
+ </td>
</tr>
- </xsl:template>
-
- <!-- special case - TODO handle this better -->
- <!-- <xsl:template match="d:parent" mode="row">
- <tr>
- <td>
- <xsl:value-of select="@name"/>
- </td>
- <td>
- <a href="{@link}">html</a>
- </td>
- <td>
- <a href="{@link}.xml">xml</a>
- </td>
- <td>
- <a href="{@link}.json">json</a>
- </td>
- <td>
- <a href="{@link}.jsonp">jsonp</a>
- </td>
- <td>
- <a href="{@link}.pdf">pdf</a>
- </td>
- </tr>
- </xsl:template>-->
+ </xsl:template>-->
</xsl:stylesheet>
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicator.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicator.xsl 2011-12-06 16:05:52 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicator.xsl 2011-12-07 16:03:19 +0000
@@ -67,27 +67,18 @@
</table>
- <xsl:apply-templates select="d:groups|d:dataSets" mode="indicator" />
+ <xsl:apply-templates select="d:indicatorGroups|d:dataSets" mode="short"/>
</div>
</xsl:template>
-
- <xsl:template match="d:groups" mode="indicator">
- <xsl:if test="count(child::*) > 0">
- <h3>Indicator Groups</h3>
- <table border="1" class="indicatorGroups">
- <xsl:apply-templates select="child::*" mode="row"/>
- </table>
- </xsl:if>
- </xsl:template>
-
- <xsl:template match="d:dataSets" mode="indicator">
- <xsl:if test="count(child::*) > 0">
- <h3>DataSets</h3>
- <table border="1" class="dataSets">
- <xsl:apply-templates select="child::*" mode="row"/>
- </table>
- </xsl:if>
- </xsl:template>
-
+
+ <xsl:template match="d:indicators" mode="short">
+ <xsl:if test="count(child::*) > 0">
+ <h3>Indicators</h3>
+ <table border="1" class="indicators">
+ <xsl:apply-templates select="child::*" mode="row"/>
+ </table>
+ </xsl:if>
+ </xsl:template>
+
</xsl:stylesheet>
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicatorGroup.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicatorGroup.xsl 2011-12-06 20:59:32 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicatorGroup.xsl 2011-12-07 16:03:19 +0000
@@ -23,17 +23,17 @@
</tr>
</table>
- <xsl:apply-templates select="d:indicators"/>
+ <xsl:apply-templates select="d:indicators" mode="short"/>
</div>
</xsl:template>
- <xsl:template match="d:indicators">
+ <xsl:template match="d:indicatorGroups" mode="short" >
<xsl:if test="count(child::*) > 0">
- <h3>Indicators</h3>
- <table border="1" class="indicators">
+ <h3>Indicator Groups</h3>
+ <table border="1" class="indicatorGroups">
<xsl:apply-templates select="child::*" mode="row"/>
</table>
</xsl:if>
</xsl:template>
-
+
</xsl:stylesheet>
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicatorGroupSet.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicatorGroupSet.xsl 2011-12-06 20:59:32 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicatorGroupSet.xsl 2011-12-07 16:03:19 +0000
@@ -23,17 +23,8 @@
</tr>
</table>
- <xsl:apply-templates select="d:indicatorGroups"/>
+ <xsl:apply-templates select="d:indicatorGroups" mode="short"/>
</div>
</xsl:template>
- <xsl:template match="d:indicatorGroups">
- <xsl:if test="count(child::*) > 0">
- <h3>Indicator Groups</h3>
- <table border="1" class="indicatorGroups">
- <xsl:apply-templates select="child::*" mode="row"/>
- </table>
- </xsl:if>
- </xsl:template>
-
</xsl:stylesheet>
=== added file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicatorType.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicatorType.xsl 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicatorType.xsl 2011-12-07 14:09:14 +0000
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:d="http://dhis2.org/schema/dxf/2.0"
+ >
+
+ <xsl:template match="d:indicatorType">
+ <div class="indicatorType">
+ <h2>
+ <xsl:value-of select="@name" />
+ </h2>
+ <table border="1">
+ <tr>
+ <td>ID</td>
+ <td>
+ <xsl:value-of select="@id" />
+ </td>
+ </tr>
+ <tr>
+ <td>Last Updated</td>
+ <td>
+ <xsl:value-of select="@lastUpdated" />
+ </td>
+ </tr>
+ <tr>
+ <td>Factor</td>
+ <td>
+ <xsl:value-of select="d:factor" />
+ </td>
+ </tr>
+ <tr>
+ <td>Number</td>
+ <td>
+ <xsl:value-of select="d:number" />
+ </td>
+ </tr>
+ </table>
+
+ </div>
+ </xsl:template>
+
+</xsl:stylesheet>
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/list.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/list.xsl 2011-12-07 12:45:41 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/list.xsl 2011-12-07 14:04:35 +0000
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:d="http://dhis2.org/schema/dxf/2.0"
- >
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:d="http://dhis2.org/schema/dxf/2.0"
+ >
<xsl:include href="identifiable-row.xsl"/>
@@ -11,11 +11,11 @@
d:categoryOptions|d:categoryOptionCombos|d:dataElements|d:indicators|
d:organisationUnits|d:dataElementGroups|d:dataElementGroupSets|
d:indicatorGroups|d:indicatorGroupSets|d:organisationUnitGroups|
- d:organisationUnitGroupSets">
+ d:organisationUnitGroupSets|d:indicatorTypes">
<h3> <xsl:value-of select="local-name()"/> </h3>
<table border="1">
- <xsl:apply-templates select="child::*" mode="row"/>
+ <xsl:apply-templates select="child::*" mode="row"/>
</table>
</xsl:template>
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/map.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/map.xsl 2011-12-06 17:38:17 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/map.xsl 2011-12-07 14:04:35 +0000
@@ -1,65 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns="http://www.w3.org/1999/xhtml" xmlns:d="http://dhis2.org/schema/dxf/2.0">
-
- <xsl:template match="d:map">
- <div class="map">
- <h2><xsl:value-of select="@name"/></h2>
- <a href="{@link}.png"><img src="{@link}.png" style="border-style:solid; border-width: 1px; padding: 5px;" /></a>
-
- <h3>Details</h3>
-
- <table border="1">
- <xsl:for-each select="attribute::*">
- <tr><td><xsl:value-of select="local-name()"/></td><td><xsl:value-of select="."/></td></tr>
- </xsl:for-each>
- <xsl:for-each select="child::*">
- <tr><td><xsl:value-of select="local-name()"/></td><td>
- <xsl:choose>
- <xsl:when test="@name"><a href="{@link}"><xsl:value-of select="@name"/></a>
- </xsl:when>
- <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
- </xsl:choose>
- </td></tr>
- </xsl:for-each>
- </table>
- </div>
- </xsl:template>
-
- <xsl:template match="d:map" mode="row">
- <tr>
- <td><xsl:value-of select="@name"/></td>
- <td>
- <xsl:element name="a">
- <xsl:attribute name="href"><xsl:value-of select="@link"/></xsl:attribute>
- <xsl:text>html</xsl:text>
- </xsl:element>
- </td>
- <td>
- <xsl:element name="a">
- <xsl:attribute name="href"><xsl:value-of select="concat(@link,'.png')"/></xsl:attribute>
- <xsl:text>png</xsl:text>
- </xsl:element>
- </td>
- <td>
- <xsl:element name="a">
- <xsl:attribute name="href"><xsl:value-of select="concat(@link,'.xml')"/></xsl:attribute>
- <xsl:text>xml</xsl:text>
- </xsl:element>
- </td>
- <td>
- <xsl:element name="a">
- <xsl:attribute name="href"><xsl:value-of select="concat(@link,'.json')"/></xsl:attribute>
- <xsl:text>json</xsl:text>
- </xsl:element>
- </td>
- <td>
- <xsl:element name="a">
- <xsl:attribute name="href"><xsl:value-of select="concat(@link,'.jsonp')"/></xsl:attribute>
- <xsl:text>jsonp</xsl:text>
- </xsl:element>
- </td>
- </tr>
- </xsl:template>
+ xmlns="http://www.w3.org/1999/xhtml" xmlns:d="http://dhis2.org/schema/dxf/2.0">
+
+ <xsl:template match="d:map">
+ <div class="map">
+ <h2><xsl:value-of select="@name"/></h2>
+ <a href="{@link}.png"><img src="{@link}.png" style="border-style:solid; border-width: 1px; padding: 5px;" /></a>
+
+ <h3>Details</h3>
+
+ <table border="1">
+ <xsl:for-each select="attribute::*">
+ <tr><td><xsl:value-of select="local-name()"/></td><td><xsl:value-of select="."/></td></tr>
+ </xsl:for-each>
+ <xsl:for-each select="child::*">
+ <tr><td><xsl:value-of select="local-name()"/></td><td>
+ <xsl:choose>
+ <xsl:when test="@name"><a href="{@link}"><xsl:value-of select="@name"/></a>
+ </xsl:when>
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
+ </xsl:choose>
+ </td></tr>
+ </xsl:for-each>
+ </table>
+ </div>
+ </xsl:template>
+
+ <xsl:template match="d:map" mode="row">
+ <tr>
+ <td><xsl:value-of select="@name"/></td>
+ <td>
+ <xsl:element name="a">
+ <xsl:attribute name="href"><xsl:value-of select="@link"/></xsl:attribute>
+ <xsl:text>html</xsl:text>
+ </xsl:element>
+ </td>
+ <td>
+ <xsl:element name="a">
+ <xsl:attribute name="href"><xsl:value-of select="concat(@link,'.png')"/></xsl:attribute>
+ <xsl:text>png</xsl:text>
+ </xsl:element>
+ </td>
+ <td>
+ <xsl:element name="a">
+ <xsl:attribute name="href"><xsl:value-of select="concat(@link,'.xml')"/></xsl:attribute>
+ <xsl:text>xml</xsl:text>
+ </xsl:element>
+ </td>
+ <td>
+ <xsl:element name="a">
+ <xsl:attribute name="href"><xsl:value-of select="concat(@link,'.json')"/></xsl:attribute>
+ <xsl:text>json</xsl:text>
+ </xsl:element>
+ </td>
+ <td>
+ <xsl:element name="a">
+ <xsl:attribute name="href"><xsl:value-of select="concat(@link,'.jsonp')"/></xsl:attribute>
+ <xsl:text>jsonp</xsl:text>
+ </xsl:element>
+ </td>
+ </tr>
+ </xsl:template>
</xsl:stylesheet>
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/model2html.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/model2html.xsl 2011-12-07 12:27:51 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/model2html.xsl 2011-12-07 16:03:19 +0000
@@ -10,6 +10,9 @@
<!-- html page level settings -->
<xsl:include href="html-wrapper.xsl"/>
+ <!-- for resource 'directory' -->
+ <xsl:include href="resource.xsl"/>
+
<!-- for list views -->
<xsl:include href="list.xsl"/>
@@ -24,6 +27,7 @@
<xsl:include href="dataElementGroup.xsl"/>
<xsl:include href="dataElementGroupSet.xsl"/>
<xsl:include href="indicator.xsl"/>
+ <xsl:include href="indicatorType.xsl"/>
<xsl:include href="indicatorGroup.xsl"/>
<xsl:include href="indicatorGroupSet.xsl"/>
<xsl:include href="organisationUnit.xsl"/>
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/organisationUnit.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/organisationUnit.xsl 2011-12-06 20:30:07 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/organisationUnit.xsl 2011-12-07 16:03:19 +0000
@@ -44,27 +44,27 @@
</table>
- <xsl:apply-templates select="d:parent|d:organisationUnitGroups|d:dataSets" />
+ <xsl:apply-templates select="d:parent|d:organisationUnitGroups|d:dataSets" mode="short" />
</div>
</xsl:template>
-
- <xsl:template match="d:parent">
+
+ <xsl:template match="d:organisationUnits" mode="short">
+ <xsl:if test="count(child::*) > 0">
+ <h3>OrganisationUnits</h3>
+ <table border="1">
+ <xsl:apply-templates select="child::*" mode="row"/>
+ </table>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="d:parent" mode="short">
<h3>Parent OrganisationUnit</h3>
<table border="1">
<xsl:apply-templates select="." mode="row"/>
</table>
</xsl:template>
- <xsl:template match="d:organisationUnitGroups">
- <xsl:if test="count(child::*) > 0">
- <h3>OrganisationUnit Groups</h3>
- <table border="1" class="organisationUnitGroups">
- <xsl:apply-templates select="child::*" mode="row"/>
- </table>
- </xsl:if>
- </xsl:template>
-
<xsl:template match="d:dataSets">
<xsl:if test="count(child::*) > 0">
<h3>DataSets</h3>
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/organisationUnitGroup.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/organisationUnitGroup.xsl 2011-12-06 20:59:32 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/organisationUnitGroup.xsl 2011-12-07 16:03:19 +0000
@@ -23,17 +23,17 @@
</tr>
</table>
- <xsl:apply-templates select="d:organisationUnits"/>
+ <xsl:apply-templates select="d:organisationUnits" mode="short"/>
</div>
</xsl:template>
- <xsl:template match="d:organisationUnits">
+ <xsl:template match="d:organisationUnitGroups" mode="short">
<xsl:if test="count(child::*) > 0">
- <h3>OrganisationUnits</h3>
- <table border="1" class="organisationUnits">
+ <h3>OrganisationUnit Groups</h3>
+ <table border="1" class="organisationUnitGroups">
<xsl:apply-templates select="child::*" mode="row"/>
</table>
</xsl:if>
</xsl:template>
-
+
</xsl:stylesheet>
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/organisationUnitGroupSet.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/organisationUnitGroupSet.xsl 2011-12-06 20:59:32 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/organisationUnitGroupSet.xsl 2011-12-07 16:03:19 +0000
@@ -23,17 +23,8 @@
</tr>
</table>
- <xsl:apply-templates select="d:organisationUnitGroups"/>
+ <xsl:apply-templates select="d:organisationUnitGroups" mode="short"/>
</div>
</xsl:template>
-
- <xsl:template match="d:organisationUnitGroups">
- <xsl:if test="count(child::*) > 0">
- <h3>OrganisationUnit Groups</h3>
- <table border="1" class="organisationUnitGroups">
- <xsl:apply-templates select="child::*" mode="row"/>
- </table>
- </xsl:if>
- </xsl:template>
-
+
</xsl:stylesheet>
=== added file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/resource.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/resource.xsl 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/resource.xsl 2011-12-07 16:03:19 +0000
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:d="http://dhis2.org/schema/dxf/2.0"
+ >
+
+ <xsl:template match="d:resources">
+ <h1>Resources</h1>
+ <ul class="resources">
+ <xsl:for-each select="child::*">
+ <li>
+ <h2><xsl:value-of select="@name"/></h2>
+ <xsl:variable name="link" select="@link"/>
+ <table border="1">
+ <tr>
+ <xsl:for-each select="d:mediaTypes/d:mediaType">
+ <td>
+ <xsl:choose>
+ <xsl:when test="text()='text/html'">
+ <xsl:element name="a">
+ <xsl:attribute name="href">
+ <xsl:value-of select="$link"/>
+ </xsl:attribute>
+ <xsl:text>text/html</xsl:text>
+ </xsl:element>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="text()='application/xml'">
+ <xsl:element name="a">
+ <xsl:attribute name="href">
+ <xsl:value-of select="concat($link,'.xml')"/>
+ </xsl:attribute>
+ <xsl:text>application/xml</xsl:text>
+ </xsl:element>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="text()='application/json'">
+ <xsl:element name="a">
+ <xsl:attribute name="href">
+ <xsl:value-of select="concat($link,'.json')"/>
+ </xsl:attribute>
+ <xsl:text>application/json</xsl:text>
+ </xsl:element>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="text()='application/javascript'">
+ <xsl:element name="a">
+ <xsl:attribute name="href">
+ <xsl:value-of select="concat($link,'.jsonp')"/>
+ </xsl:attribute>
+ <xsl:text>application/javascript</xsl:text>
+ </xsl:element>
+ </xsl:when>
+ <xsl:when test="text()='application/pdf'">
+ <xsl:element name="a">
+ <xsl:attribute name="href">
+ <xsl:value-of select="concat($link,'.pdf')"/>
+ </xsl:attribute>
+ <xsl:text>application/pdf</xsl:text>
+ </xsl:element>
+ </xsl:when>
+ </xsl:choose>
+ </td>
+ </xsl:for-each>
+ </tr>
+ </table>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/users.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/users.xsl 2011-12-06 13:34:35 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/users.xsl 2011-12-07 14:04:35 +0000
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:d="http://dhis2.org/schema/dxf/2.0"
- >
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:d="http://dhis2.org/schema/dxf/2.0"
+ >
<xsl:include href="identifiable-row.xsl" />
<xsl:include href="html-wrapper.xsl" />
<xsl:include href="list.xsl" />
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/list.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/list.xsl 2011-12-06 17:12:25 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/list.xsl 2011-12-07 14:04:35 +0000
@@ -3,17 +3,17 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:d="http://dhis2.org/schema/dxf/2.0"
- >
-
+ >
+
<xsl:output method="xml" />
-
+
<xsl:template match="/">
<fo:root>
- <fo:layout-master-set>
- <fo:simple-page-master master-name="A4">
- <fo:region-body margin="1in" />
- </fo:simple-page-master>
- </fo:layout-master-set>
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="A4">
+ <fo:region-body margin="1in" />
+ </fo:simple-page-master>
+ </fo:layout-master-set>
<fo:page-sequence master-reference="A4">
<fo:flow flow-name="xsl-region-body">
@@ -26,44 +26,44 @@
</fo:root>
</xsl:template>
-<xsl:template match="d:dataElement">
-<fo:block font-size="12pt" font-weight="bold" border-bottom="1pt solid black"><xsl:value-of select="@name" /></fo:block>
-<fo:table border-top="1pt solid black" margin-bottom="10pt" table-layout="fixed">
- <fo:table-body>
- <fo:table-row>
- <fo:table-cell><fo:block>ShortName</fo:block></fo:table-cell>
- <fo:table-cell><fo:block><xsl:value-of select="@shortName" /></fo:block></fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell><fo:block>LastUpdated</fo:block></fo:table-cell>
- <fo:table-cell><fo:block><xsl:value-of select="@lastUpdated" /></fo:block></fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell><fo:block>Active</fo:block></fo:table-cell>
- <fo:table-cell><fo:block><xsl:value-of select="d:active" /></fo:block></fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell><fo:block>AggregationOperator</fo:block></fo:table-cell>
- <fo:table-cell><fo:block><xsl:value-of select="d:aggregationOperator" /></fo:block></fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell><fo:block>DomainType</fo:block></fo:table-cell>
- <fo:table-cell><fo:block><xsl:value-of select="d:domainType" /></fo:block></fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell><fo:block>SortOrder</fo:block></fo:table-cell>
- <fo:table-cell><fo:block><xsl:value-of select="d:sortOrder" /></fo:block></fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell><fo:block>Type</fo:block></fo:table-cell>
- <fo:table-cell><fo:block><xsl:value-of select="d:type" /></fo:block></fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell><fo:block>ZeroIsSignificant</fo:block></fo:table-cell>
- <fo:table-cell><fo:block><xsl:value-of select="d:zeroIsSignificant" /></fo:block></fo:table-cell>
- </fo:table-row>
- </fo:table-body>
-</fo:table>
-</xsl:template>
+ <xsl:template match="d:dataElement">
+ <fo:block font-size="12pt" font-weight="bold" border-bottom="1pt solid black"><xsl:value-of select="@name" /></fo:block>
+ <fo:table border-top="1pt solid black" margin-bottom="10pt" table-layout="fixed">
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell><fo:block>ShortName</fo:block></fo:table-cell>
+ <fo:table-cell><fo:block><xsl:value-of select="@shortName" /></fo:block></fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell><fo:block>LastUpdated</fo:block></fo:table-cell>
+ <fo:table-cell><fo:block><xsl:value-of select="@lastUpdated" /></fo:block></fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell><fo:block>Active</fo:block></fo:table-cell>
+ <fo:table-cell><fo:block><xsl:value-of select="d:active" /></fo:block></fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell><fo:block>AggregationOperator</fo:block></fo:table-cell>
+ <fo:table-cell><fo:block><xsl:value-of select="d:aggregationOperator" /></fo:block></fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell><fo:block>DomainType</fo:block></fo:table-cell>
+ <fo:table-cell><fo:block><xsl:value-of select="d:domainType" /></fo:block></fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell><fo:block>SortOrder</fo:block></fo:table-cell>
+ <fo:table-cell><fo:block><xsl:value-of select="d:sortOrder" /></fo:block></fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell><fo:block>Type</fo:block></fo:table-cell>
+ <fo:table-cell><fo:block><xsl:value-of select="d:type" /></fo:block></fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell><fo:block>ZeroIsSignificant</fo:block></fo:table-cell>
+ <fo:table-cell><fo:block><xsl:value-of select="d:zeroIsSignificant" /></fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </xsl:template>
</xsl:stylesheet>
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/model2fop.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/model2fop.xsl 2011-12-06 17:12:25 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/model2fop.xsl 2011-12-07 14:04:35 +0000
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0">
-
- <xsl:include href="list.xsl"/>
-
+ version="1.0">
+
+ <xsl:include href="list.xsl"/>
+
</xsl:stylesheet>
\ No newline at end of file