Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyleHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyleHandler.java	(revision 734)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyleHandler.java	(revision 735)
@@ -17,4 +17,5 @@
 	String curKey = null;
 	String curValue = null;
+	String curBoolean = null;
 	int curLineWidth = -1;
 	int curLineRealWidth = 0;
@@ -56,7 +57,13 @@
 				for (int count=0; count<atts.getLength(); count++) {
 					if(atts.getQName(count).equals("k"))
-						curKey = atts.getValue(count);        
+					{
+						curKey = atts.getValue(count);
+						curBoolean = null;
+						curValue = null;
+					}
 					else if(atts.getQName(count).equals("v"))
-						curValue = atts.getValue(count);        
+						curValue = atts.getValue(count);
+					else if(atts.getQName(count).equals("b"))
+						curBoolean = atts.getValue(count);
 				}
 			} else if (qName.equals("line")) {
@@ -127,5 +134,5 @@
 				newStyle = new LineElemStyle(curLineWidth, curLineRealWidth, curLineColour, 
 						curLineDashed, curScaleMax, curScaleMin);
-				MapPaintStyles.add(curKey, curValue, newStyle);
+				MapPaintStyles.add(curKey, curValue, curBoolean, newStyle);
 				curLineWidth	= -1;
 				curLineRealWidth= 0;
@@ -136,5 +143,5 @@
 			if (curIcon != null) {
 				newStyle = new IconElemStyle(curIcon, curIconAnnotate, curScaleMax, curScaleMin);
-				MapPaintStyles.add(curKey, curValue, newStyle);
+				MapPaintStyles.add(curKey, curValue, curBoolean, newStyle);
 				curIcon 		= null;
 				curIconAnnotate = true;
@@ -142,5 +149,5 @@
 			if (curAreaColour != null) {
 				newStyle = new AreaElemStyle (curAreaColour, curScaleMax, curScaleMin);
-				MapPaintStyles.add(curKey, curValue, newStyle);
+				MapPaintStyles.add(curKey, curValue, curBoolean, newStyle);
 				curAreaColour 	= null;
 			}
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java	(revision 734)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java	(revision 735)
@@ -9,4 +9,5 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.data.osm.OsmUtils;
 import org.xml.sax.InputSource;
 import org.xml.sax.XMLReader;
@@ -75,20 +76,29 @@
 	}
 
-	static int nr = 0;
+//	static int nr = 0;
 
-	public static void add (String k, String v, ElemStyle style) {
+	public static void add (String k, String v, String b, ElemStyle style) {
 		ElemStyle  old_style;
-		String key = k + "=" + v;
+		String key;
 
 		/* unfortunately, there don't seem to be an efficient way to */
 		/* find out, if a given OsmPrimitive is an area or not, */
 		/* so distinguish only between way and node here - for now */
-		if (style instanceof AreaElemStyle) {
-			key = key + "way";
-		} else if (style instanceof LineElemStyle) {
-			key = key + "way";
-		} else if (style instanceof IconElemStyle) {
-			key = key + "node";
-		}
+		if (style instanceof AreaElemStyle)
+			key = "way";
+		else if (style instanceof LineElemStyle)
+			key = "way";
+		else if (style instanceof IconElemStyle)
+			key = "node";
+		else
+			key = "";
+
+		if(v != null)
+			key += "n" + k + "=" + v;
+		else if(b != null)
+			key += "b" + k  + "=" + OsmUtils.getNamedOsmBoolean(b);
+		else
+			key += "x" + k;
+
 		/* avoid duplicates - for now */
 		old_style = styles.get(key);
@@ -120,42 +130,47 @@
 			{
 				String key = iterator.next();
-				kv = key + "=" + p.keys.get(key) + classname;
-				if (styles.containsKey(kv))	{
+				kv = classname + "n" + key + "=" + p.keys.get(key);
+				if (styles.containsKey(kv))
 					return styles.get(kv);
-				}
+				kv = classname + "b" + key + "=" + OsmUtils.getNamedOsmBoolean(p.keys.get(key));
+				if (styles.containsKey(kv))
+					return styles.get(kv);
+				kv = classname + "x" + key;
+				if (styles.containsKey(kv))
+					return styles.get(kv);
 			}
 
 			// not a known key/value combination
-			boolean first_line = true;
+//			boolean first_line = true;
 
 			// filter out trivial tags and show the rest
-			iterator = p.keys.keySet().iterator();
-			while (iterator.hasNext()) {
-				String key = iterator.next();
-				kv = key + "=" + p.keys.get(key);
-				if (!kv.startsWith("created_by=") &&
-						!kv.startsWith("converted_by=") &&
-						!kv.startsWith("source=") &&
-						!kv.startsWith("note=") &&
-						!kv.startsWith("layer=") &&
-						!kv.startsWith("bridge=") &&
-						!kv.startsWith("tunnel=") &&
-						!kv.startsWith("oneway=") &&
-						!kv.startsWith("speedlimit=") &&
-						!kv.startsWith("motorcar=") &&
-						!kv.startsWith("horse=") &&
-						!kv.startsWith("bicycle=") &&
-						!kv.startsWith("foot=")
-				) {
+//			iterator = p.keys.keySet().iterator();
+//			while (iterator.hasNext()) {
+//				String key = iterator.next();
+//				kv = key + "=" + p.keys.get(key);
+//				if (!kv.startsWith("created_by=") &&
+//						!kv.startsWith("converted_by=") &&
+//						!kv.startsWith("source=") &&
+//						!kv.startsWith("note=") &&
+//						!kv.startsWith("layer=") &&
+//						!kv.startsWith("bridge=") &&
+//						!kv.startsWith("tunnel=") &&
+//						!kv.startsWith("oneway=") &&
+//						!kv.startsWith("speedlimit=") &&
+//						!kv.startsWith("motorcar=") &&
+//						!kv.startsWith("horse=") &&
+//						!kv.startsWith("bicycle=") &&
+//						!kv.startsWith("foot=")
+//				) {
 
-					if (first_line) {
-						nr++;
-						//System.out.println("mappaint - rule not found[" + nr + "]: " + kv + " id:" + p.id);
-					} else {
-						//System.out.println("mappaint - rule not found[" + nr + "]: " + kv);
-					}
-					first_line=false;
-				}
-			}
+//					if (first_line) {
+//						nr++;
+//						System.out.println("mappaint - rule not found[" + nr + "]: " + kv + " id:" + p.id);
+//					} else {
+//						System.out.println("mappaint - rule not found[" + nr + "]: " + kv);
+//					}
+//					first_line=false;
+//				}
+//			}
 		}
 
Index: /trunk/styles/standard/elemstyles.xml
===================================================================
--- /trunk/styles/standard/elemstyles.xml	(revision 734)
+++ /trunk/styles/standard/elemstyles.xml	(revision 735)
@@ -19,5 +19,5 @@
 	<!-- mark some specials that should be fixed - they are already the default and therefore shouldn't be tagged -->
     <rule>
-       <condition k="oneway" v="yes"/>
+       <condition k="oneway"/>
 	   <!-- no line or area, as this is a highway=xy, railway=xy, .... -->
        <icon annotate="true" src="misc/deprecated.png" />
@@ -26,40 +26,5 @@
      </rule>
     <rule>
-       <condition k="oneway" v="1"/>
-	   <!-- no line or area, as this is a highway=xy, railway=xy, .... -->
-       <icon annotate="true" src="misc/deprecated.png" />
-       <scale_min>1</scale_min>
-       <scale_max>40000</scale_max>
-     </rule>
-    <rule>
-       <condition k="oneway" v="-1"/>
-	   <!-- no line or area, as this is a highway=xy, railway=xy, .... -->
-       <icon annotate="true" src="misc/deprecated.png" />
-       <scale_min>1</scale_min>
-       <scale_max>40000</scale_max>
-     </rule>
-    <rule>
-       <condition k="oneway" v="true"/>
-	   <!-- no line or area, as this is a highway=xy, railway=xy, .... -->
-       <icon annotate="true" src="misc/deprecated.png" />
-       <scale_min>1</scale_min>
-       <scale_max>40000</scale_max>
-     </rule>
-    <rule>
-       <condition k="oneway" v="no"/>
-       <line width="2" realwidth="5" dashed="true" colour="#ff0000"/>
-       <icon annotate="true" src="misc/deprecated.png" />
-       <scale_min>1</scale_min>
-       <scale_max>40000</scale_max>
-     </rule>
-    <rule>
-       <condition k="oneway" v="false"/>
-       <line width="2" realwidth="5" dashed="true" colour="#ff0000"/>
-       <icon annotate="true" src="misc/deprecated.png" />
-       <scale_min>1</scale_min>
-       <scale_max>40000</scale_max>
-     </rule>
-    <rule>
-       <condition k="bridge" v="yes"/>
+       <condition k="bridge" b="yes"/>
 	   <!-- no line or area, as this is a highway=xy, railway=xy, .... -->
        <icon annotate="true" src="vehicle/viaduct.png" />
@@ -68,19 +33,5 @@
      </rule>
     <rule>
-       <condition k="bridge" v="true"/>
-	   <!-- no line or area, as this is a highway=xy, railway=xy, .... -->
-       <icon annotate="true" src="vehicle/viaduct.png" />
-       <scale_min>1</scale_min>
-       <scale_max>40000</scale_max>
-     </rule>
-    <rule>
-       <condition k="bridge" v="false"/>
-       <line width="2" realwidth="5" dashed="true" colour="#ff0000"/>
-       <icon annotate="true" src="misc/deprecated.png" />
-       <scale_min>1</scale_min>
-       <scale_max>40000</scale_max>
-     </rule>
-    <rule>
-       <condition k="bridge" v="no"/>
+       <condition k="bridge" b="no"/>
        <line width="2" realwidth="5" dashed="true" colour="#ff0000"/>
        <icon annotate="true" src="misc/deprecated.png" />
@@ -110,5 +61,5 @@
      </rule>
     <rule>
-       <condition k="tunnel" v="yes"/>
+       <condition k="tunnel" b="yes"/>
 	   <!-- no line or area, as this is a highway=xy, railway=xy, .... -->
 		<icon annotate="true" src="vehicle/tunnel.png" />
@@ -117,12 +68,5 @@
      </rule>
     <rule>
-       <condition k="tunnel" v="true"/>
-	   <!-- no line or area, as this is a highway=xy, railway=xy, .... -->
-		<icon annotate="true" src="vehicle/tunnel.png" />
-       <scale_min>1</scale_min>
-       <scale_max>40000</scale_max>
-     </rule>
-    <rule>
-       <condition k="tunnel" v="false"/>
+       <condition k="tunnel" b="no"/>
        <line width="2" realwidth="5" dashed="true" colour="#ff0000"/>
        <icon annotate="true" src="misc/deprecated.png" />
@@ -131,5 +75,5 @@
      </rule>
     <rule>
-       <condition k="tunnel" v="no"/>
+       <condition k="cutting" b="no"/>
        <line width="2" realwidth="5" dashed="true" colour="#ff0000"/>
        <icon annotate="true" src="misc/deprecated.png" />
@@ -138,12 +82,5 @@
      </rule>
     <rule>
-       <condition k="cutting" v="false"/>
-       <line width="2" realwidth="5" dashed="true" colour="#ff0000"/>
-       <icon annotate="true" src="misc/deprecated.png" />
-       <scale_min>1</scale_min>
-       <scale_max>40000</scale_max>
-     </rule>
-    <rule>
-       <condition k="embankment" v="false"/>
+       <condition k="embankment" b="no"/>
        <line width="2" realwidth="5" dashed="true" colour="#ff0000"/>
        <icon annotate="true" src="misc/deprecated.png" />
