dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #36125
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18488: Fixed GML importer bug where gml:innerBoundaryIs element was not correctly concatenated with the ...
------------------------------------------------------------
revno: 18488
committer: Halvdan Hoem Grelland <halvdanhg@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-03-05 17:05:19 +0100
message:
Fixed GML importer bug where gml:innerBoundaryIs element was not correctly concatenated with the gml:outerBoundaryIs, resulting in invalid js array markup being produced.
modified:
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/gml/DefaultGmlImportService.java
dhis-2/dhis-services/dhis-service-dxf2/src/main/resources/gml/gml2dxf2.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-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/gml/DefaultGmlImportService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/gml/DefaultGmlImportService.java 2015-02-17 06:00:52 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/gml/DefaultGmlImportService.java 2015-03-05 16:05:19 +0000
@@ -59,7 +59,7 @@
public class DefaultGmlImportService
implements GmlImportService
{
- private static final String GML_TO_DXF_TRANSFORM = "gml/gml2dxf2.xsl";
+ private static final String GML_TO_DXF_STYLESHEET = "gml/gml2dxf2.xsl";
// -------------------------------------------------------------------------
// Dependencies
@@ -146,7 +146,7 @@
throws IOException, TransformerException
{
StreamSource gml = new StreamSource( input );
- StreamSource xsl = new StreamSource( new ClassPathResource( GML_TO_DXF_TRANSFORM ).getInputStream() );
+ StreamSource xsl = new StreamSource( new ClassPathResource( GML_TO_DXF_STYLESHEET ).getInputStream() );
ByteArrayOutputStream output = new ByteArrayOutputStream();
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/resources/gml/gml2dxf2.xsl'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/resources/gml/gml2dxf2.xsl 2014-10-10 14:07:30 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/resources/gml/gml2dxf2.xsl 2015-03-05 16:05:19 +0000
@@ -10,16 +10,25 @@
<xsl:template match="gml:coordinates">
<xsl:value-of select="java:gmlCoordinatesToString(normalize-space(.),$precision)"
disable-output-escaping="yes"/>
+ <xsl:if test="position() != last()">
+ <xsl:text>,</xsl:text>
+ </xsl:if>
</xsl:template>
<xsl:template match="gml:pos">
<xsl:value-of select="java:gmlPosToString(normalize-space(.),$precision)"
disable-output-escaping="yes"/>
+ <xsl:if test="position() != last()">
+ <xsl:text>,</xsl:text>
+ </xsl:if>
</xsl:template>
<xsl:template match="gml:posList">
<xsl:value-of select="java:gmlPosListToString(normalize-space(.),$precision)"
disable-output-escaping="yes"/>
+ <xsl:if test="position() != last()">
+ <xsl:text>,</xsl:text>
+ </xsl:if>
</xsl:template>
<xsl:template match="gml:Polygon">