[GRASS-SVN] r30522 - grass/trunk/scripts/r.in.wms

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Mar 10 09:40:48 EDT 2008


Author: hamish
Date: 2008-03-10 09:40:47 -0400 (Mon, 10 Mar 2008)
New Revision: 30522

Modified:
   grass/trunk/scripts/r.in.wms/r.in.wms
Log:
fix DIY XML parsing for layers with spaces in their names

Modified: grass/trunk/scripts/r.in.wms/r.in.wms
===================================================================
--- grass/trunk/scripts/r.in.wms/r.in.wms	2008-03-10 11:50:46 UTC (rev 30521)
+++ grass/trunk/scripts/r.in.wms/r.in.wms	2008-03-10 13:40:47 UTC (rev 30522)
@@ -387,8 +387,8 @@
 		    grep "Name\|Title\|Style\|Layer" | \
 		    sed -e "s/<Layer .*>/LAYER:/" \
 		      -e "s/<\/Layer.*>//" \
-		      -e "s/<Name>\s*\(\w*\)/~\1~/g" \
-		      -e "s/<\/Name>\n//g" \
+		      -e "s/<Name>\s*\([^<]*\)/~\1~/g" \
+		      -e "s/<\/Name>\n\?//g" \
 		      -e "s/<Style>\n*\s*\(\w*\)/Style: \1/" \
 		      -e "s/<\/Style>//" \
 		      -e "s/<Title>\(.*\)<\/Title>/\t --\1 /" \



More information about the grass-commit mailing list