2002/css-validator/org/w3c/css/selectors PseudoFactory.java,1.8,1.9

Update of /sources/public/2002/css-validator/org/w3c/css/selectors
In directory hutz:/tmp/cvs-serv31141/css/selectors

Modified Files:
	PseudoFactory.java 
Log Message:
adder marker pseudo-element per http://www.w3.org/TR/2011/WD-css3-lists-20110524/#marker-pseudoelement

Index: PseudoFactory.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/selectors/PseudoFactory.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- PseudoFactory.java	4 Oct 2011 20:04:09 -0000	1.8
+++ PseudoFactory.java	12 Oct 2012 20:30:42 -0000	1.9
@@ -20,180 +20,171 @@
  */
 public class PseudoFactory {
 
-    private static final String[] PSEUDOCLASS_CONSTANTSCSS3 =
-            {"link", "visited", "active", "focus", "target",
-                    "hover", "first-child", "enabled", "disabled",
-                    "checked", "indeterminate", "root", "last-child",
-                    "first-of-type", "last-of-type", "only-of-type",
-                    "only-child", "empty",
-            };
+	private static final String[] PSEUDOCLASS_CONSTANTSCSS3 = {
+			"link", "visited", "active", "focus", "target",
+			"hover", "first-child", "enabled", "disabled",
+			"checked", "indeterminate", "root", "last-child",
+			"first-of-type", "last-of-type", "only-of-type",
+			"only-child", "empty",
+	};
 
-    private static final String[] PSEUDOCLASS_CONSTANTSCSS2 =
-            {
-                    "link", "visited", "active", "focus",
-                    "hover", "first-child"
-            };
+	private static final String[] PSEUDOCLASS_CONSTANTSCSS2 = {
+			"link", "visited", "active", "focus",
+			"hover", "first-child"
+	};
 
 
-    private static final String[] PSEUDOCLASS_CONSTANTSTV =
-            {
-                    "link", "visited", "active", "focus", "first-child"
-            };
+	private static final String[] PSEUDOCLASS_CONSTANTSTV = {
+			"link", "visited", "active", "focus", "first-child"
+	};
 
-    private static final String[] PSEUDOCLASS_CONSTANTSCSS1 =
-            {
-                    "link", "visited", "active"
-            };
+	private static final String[] PSEUDOCLASS_CONSTANTSCSS1 = {
+			"link", "visited", "active"
+	};
 
-    private static final String[] PSEUDOCLASS_CONSTANTS_MOBILE =
-            {
-                    "link", "visited", "active", "focus"
-            };
+	private static final String[] PSEUDOCLASS_CONSTANTS_MOBILE = {
+			"link", "visited", "active", "focus"
+	};
 
-    private static final String[] PSEUDOELEMENT_CONSTANTSCSS3 =
-            {
-                    "first-line", "first-letter", "before", "after",
-            };
+	private static final String[] PSEUDOELEMENT_CONSTANTSCSS3 = {
+			"first-line", "first-letter", "before", "after", "marker"
+	};
 
-    private static final String[] PSEUDOELEMENT_CONSTANTSCSS2 =
-            {
-                    "first-line", "first-letter", "before", "after"
-            };
+	private static final String[] PSEUDOELEMENT_CONSTANTSCSS2 = {
+			"first-line", "first-letter", "before", "after"
+	};
 
-    private static final String[] PSEUDOELEMENT_CONSTANTSCSS1 =
-            {
-                    "first-line", "first-letter"
-            };
+	private static final String[] PSEUDOELEMENT_CONSTANTSCSS1 = {
+			"first-line", "first-letter"
+	};
 
-    private static final String[] PSEUDOFUNCTION_CONSTANTSCSS3 =
-            {
-                    "nth-child", "nth-last-child", "nth-of-type", "nth-last-of-type",
-                    "lang", "not"
-            };
+	private static final String[] PSEUDOFUNCTION_CONSTANTSCSS3 = {
+			"nth-child", "nth-last-child", "nth-of-type", "nth-last-of-type",
+			"lang", "not"
+	};
 
-    private static final String[] PSEUDOFUNCTION_CONSTANTSCSS2 =
-            {
-                    "lang"
-            };
+	private static final String[] PSEUDOFUNCTION_CONSTANTSCSS2 = {
+			"lang"
+	};
 
-    /**
-     * Returns the possible pseudo-classes for a profile
-     *
-     * @param profile the profile to get associated pseudo-classes
-     * @return the possible pseudo-classes for the profile
-     */
-    public static String[] getPseudoClass(String profile) {
-        if (profile == null || profile.equals("css2") || profile.equals("css21")) {
-            return PSEUDOCLASS_CONSTANTSCSS2;
-        }
-        if (profile.equals("css3")) {
-            return PSEUDOCLASS_CONSTANTSCSS3;
-        }
-        if (profile.equals("css1")) {
-            return PSEUDOCLASS_CONSTANTSCSS1;
-        }
-        if (profile.equals("tv")) {
-            return PSEUDOCLASS_CONSTANTSTV;
-        }
-        if (profile.equals("mobile")) {
-            return PSEUDOCLASS_CONSTANTS_MOBILE;
-        }
-        return null;
-    }
+	/**
+	 * Returns the possible pseudo-classes for a profile
+	 *
+	 * @param profile the profile to get associated pseudo-classes
+	 * @return the possible pseudo-classes for the profile
+	 */
+	public static String[] getPseudoClass(String profile) {
+		if (profile == null || profile.equals("css2") || profile.equals("css21")) {
+			return PSEUDOCLASS_CONSTANTSCSS2;
+		}
+		if (profile.equals("css3")) {
+			return PSEUDOCLASS_CONSTANTSCSS3;
+		}
+		if (profile.equals("css1")) {
+			return PSEUDOCLASS_CONSTANTSCSS1;
+		}
+		if (profile.equals("tv")) {
+			return PSEUDOCLASS_CONSTANTSTV;
+		}
+		if (profile.equals("mobile")) {
+			return PSEUDOCLASS_CONSTANTS_MOBILE;
+		}
+		return null;
+	}
 
-    /**
-     * Returns the possible pseudo-elements for a profile
-     *
-     * @param version the CSS Version^Wlevel to get associated pseudo-elements
-     * @return the possible pseudo-elements for the profile
-     */
-    public static String[] getPseudoElement(CssVersion version) {
-        switch (version) {
-            case CSS2:
-            case CSS21:
-                return PSEUDOELEMENT_CONSTANTSCSS2;
-            case CSS3:
-                return PSEUDOELEMENT_CONSTANTSCSS3;
-            case CSS1:
-                return PSEUDOELEMENT_CONSTANTSCSS1;
-            default:
-                return null;
+	/**
+	 * Returns the possible pseudo-elements for a profile
+	 *
+	 * @param version the CSS Version^Wlevel to get associated pseudo-elements
+	 * @return the possible pseudo-elements for the profile
+	 */
+	public static String[] getPseudoElement(CssVersion version) {
+		switch (version) {
+			case CSS2:
+			case CSS21:
+				return PSEUDOELEMENT_CONSTANTSCSS2;
+			case CSS3:
+				return PSEUDOELEMENT_CONSTANTSCSS3;
+			case CSS1:
+				return PSEUDOELEMENT_CONSTANTSCSS1;
+			default:
+				return null;
 
-        }
-    }
+		}
+	}
 
-    /**
-     * Returns the possible pseudo-functions for a profile
-     *
-     * @param version the profile to get associated pseudo-functions
-     * @return the possible pseudo-functions for the profile
-     */
-    public static String[] getPseudoFunction(CssVersion version) {
-        switch (version) {
-            case CSS2:
-            case CSS21:
-                return PSEUDOFUNCTION_CONSTANTSCSS2;
-            case CSS3:
-                return PSEUDOFUNCTION_CONSTANTSCSS3;
-            case CSS1:
-            default:
-                return null;
-        }
-    }
+	/**
+	 * Returns the possible pseudo-functions for a profile
+	 *
+	 * @param version the profile to get associated pseudo-functions
+	 * @return the possible pseudo-functions for the profile
+	 */
+	public static String[] getPseudoFunction(CssVersion version) {
+		switch (version) {
+			case CSS2:
+			case CSS21:
+				return PSEUDOFUNCTION_CONSTANTSCSS2;
+			case CSS3:
+				return PSEUDOFUNCTION_CONSTANTSCSS3;
+			case CSS1:
+			default:
+				return null;
+		}
+	}
 
-    /**
-     * Returns the possible pseudo-elements written as pseudo-classes
-     * for a specific profile
-     *
-     * @param version the profile to get associated exceptions to the rule
-     * @return the possible pseudo-elements/classes for the profile
-     */
-    public static String[] getPseudoElementExceptions(CssVersion version) {
-        switch (version) {
-            case CSS2:
-            case CSS21:
-            case CSS3:
-                return PSEUDOELEMENT_CONSTANTSCSS2;
-            case CSS1:
-            default:
-                return null;
-        }
-    }
+	/**
+	 * Returns the possible pseudo-elements written as pseudo-classes
+	 * for a specific profile
+	 *
+	 * @param version the profile to get associated exceptions to the rule
+	 * @return the possible pseudo-elements/classes for the profile
+	 */
+	public static String[] getPseudoElementExceptions(CssVersion version) {
+		switch (version) {
+			case CSS2:
+			case CSS21:
+			case CSS3:
+				return PSEUDOELEMENT_CONSTANTSCSS2;
+			case CSS1:
+			default:
+				return null;
+		}
+	}
 
-    /**
-     * Returns a PseudoFunctionSelector based on the name of the
-     * selector
-     *
-     * @param name,  the name of the pseudofun selector
-     * @param value, its value
-     * @throws InvalidParamException
-     */
-    public static PseudoFunctionSelector newPseudoFunction(String name,
-                                                           String value, ApplContext ac)
-            throws InvalidParamException {
-        if (name == null) {
-            throw new InvalidParamException("pseudo",
-                    "null pseudofunction", ac);
-        }
-        if (name.equals("lang")) {
-            return new PseudoFunctionLang(name, value);
-        }
-        if (name.equals("not")) {
-            return new PseudoFunctionNot(name, value);
-        }
-        if (name.equals("nth-child")) {
-            return new PseudoFunctionNthChild(name, value);
-        }
-        if (name.equals("nth-last-child")) {
-            return new PseudoFunctionNthLastChild(name, value);
-        }
-        if (name.equals("nth-of-type")) {
-            return new PseudoFunctionNthOfType(name, value);
-        }
-        if (name.equals("nth-last-of-type")) {
-            return new PseudoFunctionNthLastOfType(name, value);
-        }
-        throw new InvalidParamException("pseudo",
-                ":" + name, ac);
-    }
+	/**
+	 * Returns a PseudoFunctionSelector based on the name of the
+	 * selector
+	 *
+	 * @param name,  the name of the pseudofun selector
+	 * @param value, its value
+	 * @throws InvalidParamException
+	 */
+	public static PseudoFunctionSelector newPseudoFunction(String name,
+														   String value, ApplContext ac)
+			throws InvalidParamException {
+		if (name == null) {
+			throw new InvalidParamException("pseudo",
+					"null pseudofunction", ac);
+		}
+		if (name.equals("lang")) {
+			return new PseudoFunctionLang(name, value);
+		}
+		if (name.equals("not")) {
+			return new PseudoFunctionNot(name, value);
+		}
+		if (name.equals("nth-child")) {
+			return new PseudoFunctionNthChild(name, value);
+		}
+		if (name.equals("nth-last-child")) {
+			return new PseudoFunctionNthLastChild(name, value);
+		}
+		if (name.equals("nth-of-type")) {
+			return new PseudoFunctionNthOfType(name, value);
+		}
+		if (name.equals("nth-last-of-type")) {
+			return new PseudoFunctionNthLastOfType(name, value);
+		}
+		throw new InvalidParamException("pseudo",
+				":" + name, ac);
+	}
 }

Received on Friday, 12 October 2012 20:30:46 UTC