Index: /applications/editors/josm/i18n/convpreset.pl
===================================================================
--- /applications/editors/josm/i18n/convpreset.pl	(revision 29998)
+++ /applications/editors/josm/i18n/convpreset.pl	(revision 29999)
@@ -184,4 +184,5 @@
   {
     $combo_n = "";
+    print "\n";
   }
   elsif(!$line)
Index: /applications/editors/josm/i18n/convstyle.pl
===================================================================
--- /applications/editors/josm/i18n/convstyle.pl	(revision 29998)
+++ /applications/editors/josm/i18n/convstyle.pl	(revision 29999)
@@ -5,4 +5,6 @@
 
 use strict;
+
+my $rule_cond; # cumulated conditions from current rule
 
 # This is a simple conversion and in no way a complete XML parser
@@ -21,10 +23,43 @@
     print "/* mappaint style named $1 */ tr($1);\n";
   }
+  elsif($line =~ /<rule\s*>/)
+  {
+    $rule_cond = "";
+    print "/* $line */\n";
+  }
+  elsif($line =~ /<condition.*\s+k="([^"]*)"/)
+  {
+    my $cond_k = $1; # according to schema, k is always present
+    my $cond_v = ($line =~ /\s+v="([^"]*)"/) ? $1 : "";
+    my $cond_b = ($line =~ /\s+b="([^"]*)"/) ? $1 : "";
+    print STDERR "$0: Found both v=\"$cond_v\" and b=\"$cond_b\" for k=\"$cond_k\" at line $.\n" if ($cond_v && $cond_b);
+    my $cond = ($cond_v || $cond_b) ? "$cond_k=$cond_v$cond_b" : "$cond_k"; # v and b shouldn't appear both
+    if ($rule_cond)
+    {
+      $rule_cond .= ", " . $cond;
+    }
+    else
+    {
+      $rule_cond = $cond;
+    }
+    print "/* $line */\n";
+  }
   elsif($line =~ /colour="([^"]+)#/)
   {
-    my $c = $1;
-    my $co = $1;
-    $c =~ s/[^a-z0-9]+/./g;
-    print "/* color $co */ tr(\"$c\");\n";
+    if ($line =~ /\s+colour="([^"]+)#/)
+    {
+      my $c = $1;
+      my $co = $1;
+      $c =~ s/[^a-z0-9]+/./g;
+      print "/* color $co (applied for \"$rule_cond\") */ tr(\"$c\");";
+    }
+    if ($line =~ /\s+dashedcolour="([^"]+)#/)
+    {
+      my $c = $1;
+      my $co = $1;
+      $c =~ s/[^a-z0-9]+/./g;
+      print "/* color $co (applied for \"$rule_cond\") */ tr(\"$c\");";
+    }
+    print "\n";
   }
   else
