# HG changeset patch # User Ingo Weinzierl # Date 1277829336 0 # Node ID 19182eaccc8d1621fb70e4ea06ece19cfa73fc8c # Parent c6b2437c0c133b9b19ba9372bd68e225e4c14743 Added a prefix for WMS layers to prevent the mapserver from generating invalid xml that would end in a bug (issue314, issue315). gnv-artifacts/trunk@1245 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r c6b2437c0c13 -r 19182eaccc8d gnv-artifacts/ChangeLog --- a/gnv-artifacts/ChangeLog Tue Jun 29 09:58:44 2010 +0000 +++ b/gnv-artifacts/ChangeLog Tue Jun 29 16:35:36 2010 +0000 @@ -1,3 +1,15 @@ +2010-06-29 Ingo Weinzierl + + Issue315, Issue314 + + * src/main/java/de/intevation/gnv/state/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputState.java, + src/main/java/de/intevation/gnv/state/layer/LayerOutputState.java: All + generated wms layers will now have a prefix 'GNV_'. On this way, we can + ensure that the name of wms layers never start with a digit. This is + necessary to prevent the mapserver from generating invalid xml while + creating a GetFeatureInfo response (mapserver generates xml elements from + layer names - xml nodes may not start with a digit!). + 2010-06-29 Ingo Weinzierl Issue318 diff -r c6b2437c0c13 -r 19182eaccc8d gnv-artifacts/src/main/java/de/intevation/gnv/state/layer/LayerOutputState.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/layer/LayerOutputState.java Tue Jun 29 09:58:44 2010 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/layer/LayerOutputState.java Tue Jun 29 16:35:36 2010 +0000 @@ -707,12 +707,12 @@ protected String getLayerName(String uuid, int idx) { - return uuid + "_" + idx; + return "GNV_" + uuid + "_" + idx; } protected String getLayerTitle(String prefix, String base) { - return prefix + "_" + base; + return "GNV_" + prefix + "_" + base; } diff -r c6b2437c0c13 -r 19182eaccc8d gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputState.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputState.java Tue Jun 29 09:58:44 2010 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputState.java Tue Jun 29 16:35:36 2010 +0000 @@ -445,7 +445,7 @@ * @return the name of the layer. */ protected String getLayerName(String uuid, String type) { - return uuid + "-" + type; + return "GNV_" + uuid + "-" + type; } /** @@ -456,7 +456,7 @@ * @return the title of the layer. */ protected String getLayerTitle(String prefix, String type) { - return "" + prefix + "-" + type; + return "GNV_" + prefix + "-" + type; }