Index: applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java
===================================================================
--- applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java	(revision 9755)
+++ applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java	(revision 9854)
@@ -42,4 +42,6 @@
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.data.osm.OsmUtils;
+import org.openstreetmap.josm.data.osm.Relation;
 import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.gui.preferences.TaggingPresetPreference;
@@ -121,5 +123,5 @@
 	protected static int INVALID_SPACE     = 1204;
 	protected static int INVALID_KEY_SPACE = 1205;
-	protected static int TAG_CHECK         = 1206;
+	/** 1250 and up is used by tagcheck */
 
 	/** List of sources for spellcheck data */
@@ -276,6 +278,6 @@
 				if(d.match(p))
 				{
-					errors.add( new TestError(this, Severity.WARNING, tr("Illegal tag/value combinations"),
-					d.getDescription(), TAG_CHECK, p) );
+					errors.add( new TestError(this, d.getSeverity(), tr("Illegal tag/value combinations"),
+					d.getDescription(), d.getCode(), p) );
 					withErrors.add(p, "TC");
 					break;
@@ -662,7 +664,13 @@
 		private List<CheckerElement> data = new ArrayList<CheckerElement>();
 		private Integer type = 0;
+		private Integer code;
+		protected Severity severity;
 		protected static int NODE = 1;
 		protected static int WAY = 2;
-		protected static int ALL = 3;
+		protected static int RELATION = 3;
+		protected static int ALL = 4;
+		protected static int TAG_CHECK_ERROR  = 1250;
+		protected static int TAG_CHECK_WARN   = 1260;
+		protected static int TAG_CHECK_INFO   = 1270;
 
 		private class CheckerElement {
@@ -672,4 +680,5 @@
 			public Boolean tagAll = false;
 			public Boolean valueAll = false;
+			public Boolean valueBool = false;
 			private Pattern getPattern(String str) throws IllegalStateException, PatternSyntaxException
 			{
@@ -694,12 +703,28 @@
 				if(n.equals("*"))
 					valueAll = true;
+				else if(n.equals("BOOLEAN_TRUE"))
+				{
+					valueBool = true;
+					value = OsmUtils.trueval;
+				}
+				else if(n.equals("BOOLEAN_FALSE"))
+				{
+					valueBool = true;
+					value = OsmUtils.falseval;
+				}
 				else
 					value = n.startsWith("/") ? getPattern(n) : n;
 			}
-			public Boolean match(String key, String val)
-			{
-				Boolean tagtrue = tagAll || (tag instanceof Pattern ? ((Pattern)tag).matcher(key).matches() : key.equals(tag));
-				Boolean valtrue = valueAll || (value instanceof Pattern ? ((Pattern)value).matcher(val).matches() : val.equals(value));
-				return tagtrue && (noMatch ? !valtrue : valtrue);
+			public Boolean match(OsmPrimitive osm)
+			{
+				for(Entry<String, String> prop: osm.keys.entrySet())
+				{
+					String key = prop.getKey();
+					String val = valueBool ? OsmUtils.getNamedOsmBoolean(prop.getValue()) : prop.getValue();
+					if((tagAll || (tag instanceof Pattern ? ((Pattern)tag).matcher(key).matches() : key.equals(tag)))
+					&& (valueAll || (value instanceof Pattern ? ((Pattern)value).matcher(val).matches() : val.equals(value))))
+						return !noMatch;
+				}
+				return noMatch;
 			}
 		};
@@ -719,14 +744,33 @@
 				description = null;
 			}
-			String[] n = str.split(" *: *", 2);
+			String[] n = str.split(" *: *", 3);
 			if(n[0].equals("way"))
 				type = WAY;
 			else if(n[0].equals("node"))
 				type = NODE;
+			else if(n[0].equals("relation"))
+				type = RELATION;
 			else if(n[0].equals("*"))
 				type = ALL;
-			if(type == 0 || n.length != 2)
+			if(type == 0 || n.length != 3)
 				return tr("Could not find element type");
-			for(String exp: n[1].split(" *&& *"))
+			if(n[1].equals("W"))
+			{
+				severity = Severity.WARNING;
+				code = TAG_CHECK_WARN;
+			}
+			else if(n[1].equals("E"))
+			{
+				severity = Severity.ERROR;
+				code = TAG_CHECK_ERROR;
+			}
+			else if(n[1].equals("I"))
+			{
+				severity = Severity.OTHER;
+				code = TAG_CHECK_INFO;
+			}
+			else
+				return tr("Could not find warning level");
+			for(String exp: n[2].split(" *&& *"))
 			{
 				try
@@ -747,15 +791,10 @@
 		public Boolean match(OsmPrimitive osm)
 		{
-			if(osm.keys == null)
+			if(osm.keys == null || (type == NODE && !(osm instanceof Node))
+			|| (type == RELATION && !(osm instanceof Relation)) || (type == WAY && !(osm instanceof Way)))
 				return false;
 			for(CheckerElement ce : data)
 			{
-				Boolean result = false;
-				for(Entry<String, String> prop: osm.keys.entrySet())
-				{
-					if(result = ce.match(prop.getKey(), prop.getValue()))
-						break;
-				}
-				if(!result)
+				if(!ce.match(osm))
 					return false;
 			}
@@ -766,4 +805,12 @@
 			return tr(description);
 		}
+		public Severity getSeverity()
+		{
+			return severity;
+		}
+		public int getCode()
+		{
+			return code + type;
+		}
 	}
 }
Index: applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UnclosedWays.java
===================================================================
--- applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UnclosedWays.java	(revision 9755)
+++ applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UnclosedWays.java	(revision 9854)
@@ -7,4 +7,5 @@
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.data.osm.OsmUtils;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.plugins.validator.Severity;
@@ -110,6 +111,6 @@
 			mode = 1108;
 		}
-		test = w.get("building");
-		if (test != null && ("true".equalsIgnoreCase(test) || "yes".equalsIgnoreCase(test) || "1".equals(test)))
+		Boolean btest = OsmUtils.getOsmBoolean(w.get("building"));
+		if (btest != null && btest)
 		{
 			force = true;
@@ -117,6 +118,6 @@
 			mode = 1120;
 		}
-		test = w.get("area");
-		if (test != null && ("true".equalsIgnoreCase(test) || "yes".equalsIgnoreCase(test) || "1".equals(test)))
+		btest = OsmUtils.getOsmBoolean(w.get("area"));
+		if (btest != null && btest)
 		{
 			force = true;
Index: applications/editors/josm/plugins/validator/tagchecker.cfg
===================================================================
--- applications/editors/josm/plugins/validator/tagchecker.cfg	(revision 9755)
+++ applications/editors/josm/plugins/validator/tagchecker.cfg	(revision 9854)
@@ -3,5 +3,5 @@
 # format:
 # each line specifies a certain error to be reported
-# <data type>: <key><expression><value>
+# <data type> : messagetype : <key><expression><value>
 #
 # data type can be:
@@ -11,9 +11,19 @@
 #  *           - all data types
 #
+# message type can be:
+# E            - an error
+# W            - a warning
+# I            - an low priority informational warning
+#
 # key and value are expressions describing certain keys and values of these keys
 # regulator expressions are supported. In this case the expressions starts and
-# ends with // signs. The * sign indicates any string.
+# ends with // signs. If an i is appended, the regular expression is
+# case insensitive.
 #
-# expression can be:
+# The * sign indicates any string.
+# The texts BOOLEAN_TRUE and BOOLEAN_FALSE in the value part indicate a special
+# handling for boolean values (yes, true, 0, false, no, ...).
+#
+# Expression can be:
 #  !=          - the key/value combination does not match
 #  ==          - the key/value combination does match
@@ -26,8 +36,12 @@
 # Empty lines and space signs are ignored
 
-node : oneway == *                                         # oneway tag on a node
-node : highway == tertiary                                 # wrong highway tag on a node
-node : highway == secondary                                # wrong highway tag on a node
-way  : highway == secondary && ref != *                    # highway without a reference
-way  : highway == tertiary && ref != *                     # highway without a reference
-*    : / *name */i == * && name != *                       # misspelled key
+node : W : oneway == *                                         # oneway tag on a node
+node : W : bridge == BOOLEAN_TRUE                              # bridge tag on a node
+node : W : highway == tertiary                                 # wrong highway tag on a node
+node : W : highway == secondary                                # wrong highway tag on a node
+node : W : highway == residential                              # wrong highway tag on a node
+node : W : highway == unclassified                             # wrong highway tag on a node
+node : W : highway == track                                    # wrong highway tag on a node
+way  : I : highway == secondary && ref != *                    # highway without a reference
+way  : I : highway == tertiary && ref != *                     # highway without a reference
+*    : W : / *name */i == * && name != *                       # misspelled key name
