dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15081
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5306: fixed xslt to be namespace aware
Merge authors:
Bob Jolliffe bobjolliffe@xxxxxxxxx
Morten Olav Hansen (mortenoh)
------------------------------------------------------------
revno: 5306 [merge]
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-12-06 14:47:26 +0100
message:
fixed xslt to be namespace aware
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/Section.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/Indicator.java
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/chart.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/dataElement.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/dataSet.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/html-wrapper.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/identifiable-row.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/indicator.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/list.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/map.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/model2html.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/organisationUnit.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/users.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-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java 2011-12-03 10:35:41 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java 2011-12-06 11:41:24 +0000
@@ -443,8 +443,6 @@
this.categoryCombo = categoryCombo;
}
- @XmlElement
- @JsonProperty
public Integer getSortOrder()
{
return sortOrder;
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java 2011-12-03 14:31:45 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java 2011-12-06 11:41:24 +0000
@@ -360,8 +360,6 @@
this.sources = sources;
}
- @XmlElement
- @JsonProperty
public Integer getSortOrder()
{
return sortOrder;
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/Section.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/Section.java 2011-12-03 10:35:41 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/Section.java 2011-12-06 11:41:24 +0000
@@ -220,8 +220,6 @@
this.dataElements.add( dataElement );
}
- @XmlElement
- @JsonProperty
public int getSortOrder()
{
return sortOrder;
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/Indicator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/Indicator.java 2011-12-03 10:35:41 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/Indicator.java 2011-12-06 11:41:24 +0000
@@ -254,8 +254,6 @@
this.explodedDenominator = explodedDenominator;
}
- @XmlElement
- @JsonProperty
public Integer getSortOrder()
{
return sortOrder;
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/chart.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/chart.xsl 2011-12-02 20:35:16 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/chart.xsl 2011-12-06 13:34:35 +0000
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<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="chart">
- <div class="chart">
+ <xsl:template match="d:chart">
+ <div class="d:chart">
<h2>
<xsl:value-of select="@name"/>
</h2>
@@ -22,77 +25,77 @@
<tr>
<td>Dimension</td>
<td>
- <xsl:value-of select="dimension"/>
+ <xsl:value-of select="d:dimension"/>
</td>
</tr>
<tr>
<td>Hide legend</td>
<td>
- <xsl:value-of select="hideLegend"/>
+ <xsl:value-of select="d:hideLegend"/>
</td>
</tr>
<tr>
<td>Hide subtitle</td>
<td>
- <xsl:value-of select="hideSubtitle"/>
+ <xsl:value-of select="d:hideSubtitle"/>
</td>
</tr>
<tr>
<td>Horizontal Pilot Orientation</td>
<td>
- <xsl:value-of select="horizontalPlotOrientation"/>
+ <xsl:value-of select="d:horizontalPlotOrientation"/>
</td>
</tr>
<tr>
<td>Regression</td>
<td>
- <xsl:value-of select="regression"/>
+ <xsl:value-of select="d:regression"/>
</td>
</tr>
<tr>
<td>Size</td>
<td>
- <xsl:value-of select="size"/>
+ <xsl:value-of select="d:size"/>
</td>
</tr>
<tr>
<td>Target line</td>
<td>
- <xsl:value-of select="targetLine"/>
+ <xsl:value-of select="d:targetLine"/>
</td>
</tr>
<tr>
<td>Target line label</td>
<td>
- <xsl:value-of select="targetLineLabel"/>
+ <xsl:value-of select="d:targetLineLabel"/>
</td>
</tr>
<tr>
<td>Type</td>
<td>
- <xsl:value-of select="type"/>
+ <xsl:value-of select="d:type"/>
</td>
</tr>
<tr>
<td>User organisation unit</td>
<td>
- <xsl:value-of select="userOrganisationUnit"/>
+ <xsl:value-of select="d:userOrganisationUnit"/>
</td>
</tr>
<tr>
<td>Vertical labels</td>
<td>
- <xsl:value-of select="verticalLabels"/>
+ <xsl:value-of select="d:verticalLabels"/>
</td>
</tr>
</table>
- <xsl:apply-templates select="organisationUnits|dataElements|indicators"/>
+ <xsl:apply-templates select="d:organisationUnits|d:dataElements|d:indicators"/>
</div>
</xsl:template>
- <xsl:template match="organisationUnits">
+ <xsl:template match="d:organisationUnits">
<xsl:if test="count(child::*) > 0">
<h3>OrganisationUnits</h3>
<table border="1">
@@ -101,7 +104,7 @@
</xsl:if>
</xsl:template>
- <xsl:template match="dataElements">
+ <xsl:template match="d:dataElements">
<xsl:if test="count(child::*) > 0">
<h3>DataElements</h3>
<table border="1">
@@ -110,7 +113,7 @@
</xsl:if>
</xsl:template>
- <xsl:template match="indicators">
+ <xsl:template match="d:indicators">
<xsl:if test="count(child::*) > 0">
<h3>Indicators</h3>
<table border="1">
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/dataElement.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/dataElement.xsl 2011-12-02 20:35:16 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/dataElement.xsl 2011-12-06 13:34:35 +0000
@@ -1,7 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<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="dataElement">
+ <xsl:template match="d:dataElement">
<div class="dataElement">
<h2>
<xsl:value-of select="@name" />
@@ -29,53 +32,53 @@
<tr>
<td>Type</td>
<td>
- <xsl:value-of select="type" />
+ <xsl:value-of select="d:type" />
</td>
</tr>
<tr>
<td>Zero is Significant</td>
<td>
- <xsl:value-of select="zeroIsSignificant" />
+ <xsl:value-of select="d:zeroIsSignificant" />
</td>
</tr>
<tr>
<td>Sort Order</td>
<td>
- <xsl:value-of select="sortOrder" />
+ <xsl:value-of select="d:sortOrder" />
</td>
</tr>
<tr>
<td>Active</td>
<td>
- <xsl:value-of select="active" />
+ <xsl:value-of select="d:active" />
</td>
</tr>
<tr>
<td>Aggregation Operator</td>
<td>
- <xsl:value-of select="aggregationOperator" />
+ <xsl:value-of select="d:aggregationOperator" />
</td>
</tr>
<tr>
<td>Domain Type</td>
<td>
- <xsl:value-of select="domainType" />
+ <xsl:value-of select="d:domainType" />
</td>
</tr>
</table>
- <xsl:apply-templates select="categoryCombo|groups|dataSets" />
+ <xsl:apply-templates select="d:categoryCombo|d:groups|d:dataSets" />
</div>
</xsl:template>
- <xsl:template match="categoryCombo">
+ <xsl:template match="d:categoryCombo">
<h3>DataElementCategoryCombo</h3>
<table border="1" class="categoryCombo">
<xsl:apply-templates select="child::*" mode="row"/>
</table>
</xsl:template>
- <xsl:template match="groups">
+ <xsl:template match="d:groups">
<xsl:if test="count(child::*) > 0">
<h3>DataElementGroups</h3>
<table border="1" class="dataElementGroups">
@@ -84,7 +87,7 @@
</xsl:if>
</xsl:template>
- <xsl:template match="dataSets">
+ <xsl:template match="d:dataSets">
<xsl:if test="count(child::*) > 0">
<h3>DataSets</h3>
<table border="1" class="dataSets">
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/dataSet.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/dataSet.xsl 2011-12-02 20:35:16 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/dataSet.xsl 2011-12-06 13:34:35 +0000
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<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="dataSet">
- <div class="dataSet">
+ <xsl:template match="d:dataSet">
+ <div class="d:dataSet">
<h2>
<xsl:value-of select="@name" />
</h2>
@@ -22,39 +25,39 @@
<tr>
<td>Short Name</td>
<td>
- <xsl:value-of select="shortName" />
+ <xsl:value-of select="d:shortName" />
</td>
</tr>
<tr>
<td>Version</td>
<td>
- <xsl:value-of select="version" />
+ <xsl:value-of select="d:version" />
</td>
</tr>
<tr>
<td>Mobile</td>
<td>
- <xsl:value-of select="mobile" />
+ <xsl:value-of select="d:mobile" />
</td>
</tr>
</table>
- <xsl:apply-templates select="dataElements|indicators|sources" />
+ <xsl:apply-templates select="d:dataElements|d:indicators|d:sources" />
</div>
</xsl:template>
- <xsl:template match="dataElements">
+ <xsl:template match="d:dataElements">
<xsl:if test="count(child::*) > 0">
<h3>DataElements</h3>
- <table border="1" class="dataElements">
+ <table border="1" class="d:dataElements">
<xsl:apply-templates mode="row"/>
</table>
</xsl:if>
</xsl:template>
- <xsl:template match="indicators">
+ <xsl:template match="d:indicators">
<xsl:if test="count(child::*) > 0">
<h3>Indicators</h3>
<table border="1" class="indicator">
@@ -63,7 +66,7 @@
</xsl:if>
</xsl:template>
- <xsl:template match="sources">
+ <xsl:template match="d:sources">
<xsl:if test="count(child::*) > 0">
<h3>OrganisationUnits</h3>
<table border="1" class="sources">
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/html-wrapper.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/html-wrapper.xsl 2011-12-02 14:01:09 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/html-wrapper.xsl 2011-12-06 13:34:35 +0000
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
- <xsl:output method="html" />
+<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:output method="html" doctype-system="about:legacy-compat"/>
<xsl:template match="/">
<html>
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/identifiable-row.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/identifiable-row.xsl 2011-12-02 22:03:43 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/identifiable-row.xsl 2011-12-06 13:34:35 +0000
@@ -1,14 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl" version="1.0">
- <xd:doc scope="stylesheet">
- <xd:desc>
- <xd:p><xd:b>Created on:</xd:b> Nov 28, 2011</xd:p>
- <xd:p><xd:b>Author:</xd:b> bobj</xd:p>
- <xd:p>Generic rendering of table rows of identifiable objects</xd:p>
- </xd:desc>
- </xd:doc>
-
+<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">
<xsl:variable name="root" select="concat('/api/',local-name(.),'s')" />
<tr>
@@ -47,7 +42,7 @@
</xsl:template>
<!-- special case - TODO handle this better -->
- <xsl:template match="parent" mode="row">
+ <xsl:template match="d:parent" mode="row">
<xsl:variable name="root">/api/organisationUnits</xsl:variable>
<tr>
<td>
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/indicator.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/indicator.xsl 2011-12-02 20:35:16 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/indicator.xsl 2011-12-06 13:34:35 +0000
@@ -1,7 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<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="indicator">
+ <xsl:template match="d:indicator">
<div class="indicator">
<h2>
<xsl:value-of select="@name" />
@@ -22,63 +25,63 @@
<tr>
<td>Short Name</td>
<td>
- <xsl:value-of select="shortName" />
+ <xsl:value-of select="d:shortName" />
</td>
</tr>
<tr>
<td>Denominator</td>
<td>
- <xsl:value-of select="denominator" />
+ <xsl:value-of select="d:denominator" />
</td>
</tr>
<tr>
<td>Denominator Description</td>
<td>
- <xsl:value-of select="denominatorDescription" />
+ <xsl:value-of select="d:denominatorDescription" />
</td>
</tr>
<tr>
<td>Numerator</td>
<td>
- <xsl:value-of select="numerator" />
+ <xsl:value-of select="d:numerator" />
</td>
</tr>
<tr>
<td>Numerator Description</td>
<td>
- <xsl:value-of select="numeratorDescription" />
+ <xsl:value-of select="d:numeratorDescription" />
</td>
</tr>
<tr>
<td>Annualized</td>
<td>
- <xsl:value-of select="annualized" />
+ <xsl:value-of select="d:annualized" />
</td>
</tr>
<tr>
<td>Sort Order</td>
<td>
- <xsl:value-of select="sortOrder" />
+ <xsl:value-of select="d:sortOrder" />
</td>
</tr>
</table>
- <xsl:apply-templates select="groups|dataSets" />
+ <xsl:apply-templates select="d:groups|d:dataSets" />
</div>
</xsl:template>
- <xsl:template match="groups">
+ <xsl:template match="d:groups">
<xsl:if test="count(child::*) > 0">
<h3>Indicator Groups</h3>
- <table border="1" class="indicatorGroups">
+ <table border="1" class="d:indicatorGroups">
<xsl:apply-templates select="child::*" mode="row"/>
</table>
</xsl:if>
</xsl:template>
- <xsl:template match="dataSets">
+ <xsl:template match="d:dataSets">
<xsl:if test="count(child::*) > 0">
<h3>DataSets</h3>
<table border="1" class="dataSets">
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/list.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/list.xsl 2011-12-05 12:21:38 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/list.xsl 2011-12-06 13:34:35 +0000
@@ -1,13 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<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:include href="identifiable-row.xsl"/>
<!-- match all plural elements -->
- <xsl:template match="maps|charts|dataElements|indicators|organisationUnits|categories|categoryCombos|categoryOptions|dataElementGroups|dataElementGroupSets">
- <xsl:variable name="elements" select="local-name()" />
+ <!-- TODO: make an attribute for this -->
+ <xsl:template match="d:maps|d:charts|d:dataElements|d:indicators|d:organisationUnits|d:categories|d:categoryCombos|d:categoryOptions|d:dataElementGroups|d:dataElementGroupSets">
<h3>
- <xsl:value-of select="$elements"/>
+ <xsl:value-of select="local-name()"/>
</h3>
<table border="1">
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/map.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/map.xsl 2011-12-06 13:21:19 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/map.xsl 2011-12-06 13:47:26 +0000
@@ -1,9 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<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"
+ >
+<<<<<<< TREE
+ <xsl:template match="d:map">
+ <div class="d:map">
+ <h2>Map <xsl:value-of select="@name"/></h2>
+=======
<xsl:template match="map">
<div class="map">
<h2>Map: <xsl:value-of select="@name"/></h2>
+>>>>>>> MERGE-SOURCE
<table border="1">
<tr>
<td>Map rendering</td>
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/model2html.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/model2html.xsl 2011-12-05 12:21:38 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/model2html.xsl 2011-12-06 13:34:35 +0000
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0">
+<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"
+ exclude-result-prefixes="d"
+ >
<xsl:output method="html"/>
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/organisationUnit.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/organisationUnit.xsl 2011-12-02 22:03:43 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/organisationUnit.xsl 2011-12-06 13:34:35 +0000
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
- <xsl:template match="organisationUnit">
+<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:organisationUnit">
<div class="organisationUnit">
<h2>
<xsl:value-of select="@name" />
@@ -21,55 +25,55 @@
<tr>
<td>Short Name</td>
<td>
- <xsl:value-of select="shortName" />
+ <xsl:value-of select="d:shortName" />
</td>
</tr>
<tr>
<td>Opening Date</td>
<td>
- <xsl:value-of select="openingDate" />
+ <xsl:value-of select="d:openingDate" />
</td>
</tr>
<tr>
<td>Level</td>
<td>
- <xsl:value-of select="level" />
+ <xsl:value-of select="d:level" />
</td>
</tr>
<tr>
<td>Active</td>
<td>
- <xsl:value-of select="active" />
+ <xsl:value-of select="d:active" />
</td>
</tr>
<tr>
<td>Current Parent</td>
<td>
- <xsl:value-of select="currentParent" />
+ <xsl:value-of select="d:currentParent" />
</td>
</tr>
<tr>
<td>Has Patients</td>
<td>
- <xsl:value-of select="hasPatients" />
+ <xsl:value-of select="d:hasPatients" />
</td>
</tr>
</table>
- <xsl:apply-templates select="parent|groups|dataSets" />
+ <xsl:apply-templates select="d:parent|d:groups|d:dataSets" />
</div>
</xsl:template>
- <xsl:template match="parent">
+ <xsl:template match="d:parent">
<h3>Parent OrganisationUnit</h3>
<table border="1">
<xsl:apply-templates select="." mode="row"/>
</table>
</xsl:template>
- <xsl:template match="groups">
+ <xsl:template match="d:groups">
<xsl:if test="count(child::*) > 0">
<h3>OrganisationUnit Groups</h3>
<table border="1" class="organisationUnitGroups">
@@ -78,7 +82,7 @@
</xsl:if>
</xsl:template>
- <xsl:template match="dataSets">
+ <xsl:template match="d:dataSets">
<xsl:if test="count(child::*) > 0">
<h3>DataSets</h3>
<table border="1" class="dataSets">
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/users.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/users.xsl 2011-12-01 19:14:36 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/xslt/users.xsl 2011-12-06 13:34:35 +0000
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<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:include href="identifiable-row.xsl" />
<xsl:include href="html-wrapper.xsl" />
<xsl:include href="list.xsl" />
@@ -8,7 +11,7 @@
<xsl:param name="title">Users</xsl:param>
<xsl:param name="elements">users</xsl:param>
- <xsl:template match="user">
+ <xsl:template match="d:user">
<xsl:apply-templates />
</xsl:template>
</xsl:stylesheet>