dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #06223
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1948: Adding GML XSL to resources
------------------------------------------------------------
revno: 1948
committer: Lars <larshelg@larshelg-laptop>
branch nick: trunk
timestamp: Wed 2010-06-02 15:40:12 +0200
message:
Adding GML XSL to resources
added:
resources/xsl/
resources/xsl/gml2dxf.xsl
resources/xsl/transforms.xml
--
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
=== added directory 'resources/xsl'
=== added file 'resources/xsl/gml2dxf.xsl'
--- resources/xsl/gml2dxf.xsl 1970-01-01 00:00:00 +0000
+++ resources/xsl/gml2dxf.xsl 2010-06-02 13:40:12 +0000
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:gml="http://www.opengis.net/gml">
+
+<xsl:template match="/">
+<dxf xmlns="http://dhis2.org/schema/dxf/1.0" minorVersion="1.1">
+<organisationUnits>
+ <xsl:for-each select="//gml:featureMember">
+ <organisationUnit>
+ <id>0</id>
+ <uuid/>
+ <name><xsl:value-of select=".//*[local-name()='NAME']"/></name>
+ <shortName><xsl:value-of select=".//*[local-name()='NAME']"/></shortName>
+ <code/>
+ <openingDate/>
+ <closedDate/>
+ <active/>
+ <comment/>
+ <geoCode/>
+ <featureType>MultiPolygon</featureType>
+ <coordinates>
+ <xsl:for-each select=".//gml:Polygon">
+ <coordinate>
+ <xsl:value-of select=".//gml:coordinates"/>
+ </coordinate>
+ </xsl:for-each>
+ </coordinates>
+ <lastUpdated/>
+ </organisationUnit>
+ </xsl:for-each>
+</organisationUnits>
+</dxf>
+</xsl:template>
+
+</xsl:stylesheet>
=== added file 'resources/xsl/transforms.xml'
--- resources/xsl/transforms.xml 1970-01-01 00:00:00 +0000
+++ resources/xsl/transforms.xml 2010-06-02 13:40:12 +0000
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<transforms>
+ <transform root="FeatureCollection" ns="http://ogr.maptools.org/">
+ <xslt>gml2dxf.xsl</xslt>
+ <description>GML to DXF</description>
+ </transform>
+</transforms>