- From: CVS User ylafon <cvsmail@w3.org>
- Date: Thu, 03 Jan 2013 14:57:08 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css21
In directory roscoe:/tmp/cvs-serv15672/css21
Added Files:
CssCue.java CssCueAfter.java CssCueBefore.java
Log Message:
cue/cue-before/cue-after per css2/css21/css3 http://www.w3.org/TR/2012/CR-css3-speech-20120320/#cue
--- /sources/public/2002/css-validator/org/w3c/css/properties/css21/CssCue.java 2013/01/03 14:57:08 NONE
+++ /sources/public/2002/css-validator/org/w3c/css/properties/css21/CssCue.java 2013/01/03 14:57:08 1.1
// $Id: CssCue.java,v 1.1 2013/01/03 14:57:08 ylafon Exp $
// Author: Yves Lafon <ylafon@w3.org>
//
// (c) COPYRIGHT MIT, ERCIM and Keio University, 2013.
// Please first read the full copyright statement in file COPYRIGHT.html
package org.w3c.css.properties.css21;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.InvalidParamException;
import org.w3c.css.values.CssExpression;
import org.w3c.css.values.CssOperator;
import org.w3c.css.values.CssValue;
import org.w3c.css.values.CssValueList;
import java.util.ArrayList;
/**
* @spec http://www.w3.org/TR/2011/REC-CSS2-20110607/aural.html#propdef-cue
*/
public class CssCue extends org.w3c.css.properties.css.CssCue {
/**
* Create a new CssCue
*/
public CssCue() {
}
/**
* Creates a new CssCue
*
* @param expression The expression for this property
* @throws org.w3c.css.util.InvalidParamException
* Expressions are incorrect
*/
public CssCue(ApplContext ac, CssExpression expression, boolean check)
throws InvalidParamException {
if (check && expression.getCount() > 2) {
throw new InvalidParamException("unrecognize", ac);
}
setByUser();
char op;
cssCueBefore = new CssCueBefore(ac, expression, false);
if (expression.end()) {
cssCueAfter = new CssCueAfter();
cssCueAfter.value = cssCueBefore.value;
value = cssCueBefore.value;
} else {
op = expression.getOperator();
if (op != CssOperator.SPACE) {
throw new InvalidParamException("operator",
((new Character(op)).toString()), ac);
}
cssCueAfter = new CssCueAfter(ac, expression, false);
if (cssCueBefore.value == inherit || cssCueAfter.value == inherit) {
throw new InvalidParamException("value",
inherit, getPropertyName(), ac);
}
ArrayList<CssValue> values = new ArrayList<CssValue>(2);
values.add(cssCueBefore.value);
values.add(cssCueAfter.value);
value = new CssValueList(values);
}
}
public CssCue(ApplContext ac, CssExpression expression)
throws InvalidParamException {
this(ac, expression, false);
}
}
--- /sources/public/2002/css-validator/org/w3c/css/properties/css21/CssCueAfter.java 2013/01/03 14:57:08 NONE
+++ /sources/public/2002/css-validator/org/w3c/css/properties/css21/CssCueAfter.java 2013/01/03 14:57:08 1.1
// $Id: CssCueAfter.java,v 1.1 2013/01/03 14:57:08 ylafon Exp $
// Author: Yves Lafon <ylafon@w3.org>
//
// (c) COPYRIGHT MIT, ERCIM and Keio University, 2013.
// Please first read the full copyright statement in file COPYRIGHT.html
package org.w3c.css.properties.css21;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.InvalidParamException;
import org.w3c.css.values.CssExpression;
import org.w3c.css.values.CssTypes;
import org.w3c.css.values.CssValue;
/**
* @spec http://www.w3.org/TR/2011/REC-CSS2-20110607/aural.html#propdef-cue-after
*/
public class CssCueAfter extends org.w3c.css.properties.css.CssCueAfter {
/**
* Create a new CssCueAfter
*/
public CssCueAfter() {
}
/**
* Creates a new CssCueAfter
*
* @param expression The expression for this property
* @throws org.w3c.css.util.InvalidParamException
* Expressions are incorrect
*/
public CssCueAfter(ApplContext ac, CssExpression expression, boolean check)
throws InvalidParamException {
if (check && expression.getCount() > 1) {
throw new InvalidParamException("unrecognize", ac);
}
setByUser();
CssValue val;
char op;
val = expression.getValue();
op = expression.getOperator();
switch (val.getType()) {
case CssTypes.CSS_URL:
value = val;
break;
case CssTypes.CSS_IDENT:
if (inherit.equals(val)) {
value = inherit;
break;
}
if (none.equals(val)) {
value = none;
break;
}
default:
throw new InvalidParamException("value",
val.toString(),
getPropertyName(), ac);
}
expression.next();
}
public CssCueAfter(ApplContext ac, CssExpression expression)
throws InvalidParamException {
this(ac, expression, false);
}
}
--- /sources/public/2002/css-validator/org/w3c/css/properties/css21/CssCueBefore.java 2013/01/03 14:57:08 NONE
+++ /sources/public/2002/css-validator/org/w3c/css/properties/css21/CssCueBefore.java 2013/01/03 14:57:08 1.1
// $Id: CssCueBefore.java,v 1.1 2013/01/03 14:57:08 ylafon Exp $
// Author: Yves Lafon <ylafon@w3.org>
//
// (c) COPYRIGHT MIT, ERCIM and Keio University, 2013.
// Please first read the full copyright statement in file COPYRIGHT.html
package org.w3c.css.properties.css21;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.InvalidParamException;
import org.w3c.css.values.CssExpression;
import org.w3c.css.values.CssTypes;
import org.w3c.css.values.CssValue;
/**
* @spec http://www.w3.org/TR/2011/REC-CSS2-20110607/aural.html#propdef-cue-before
*/
public class CssCueBefore extends org.w3c.css.properties.css.CssCueBefore {
/**
* Create a new CssCueBefore
*/
public CssCueBefore() {
}
/**
* Creates a new CssCueBefore
*
* @param expression The expression for this property
* @throws org.w3c.css.util.InvalidParamException
* Expressions are incorrect
*/
public CssCueBefore(ApplContext ac, CssExpression expression, boolean check)
throws InvalidParamException {
if (check && expression.getCount() > 1) {
throw new InvalidParamException("unrecognize", ac);
}
setByUser();
CssValue val;
char op;
val = expression.getValue();
op = expression.getOperator();
switch (val.getType()) {
case CssTypes.CSS_URL:
value = val;
break;
case CssTypes.CSS_IDENT:
if (inherit.equals(val)) {
value = inherit;
break;
}
if (none.equals(val)) {
value = none;
break;
}
default:
throw new InvalidParamException("value",
val.toString(),
getPropertyName(), ac);
}
expression.next();
}
public CssCueBefore(ApplContext ac, CssExpression expression)
throws InvalidParamException {
this(ac, expression, false);
}
}
Received on Thursday, 3 January 2013 14:57:10 UTC