- From: <bugzilla@wiggum.w3.org>
- Date: Sun, 26 Sep 2004 21:32:30 +0000
- To: www-validator-cvs@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=890
Summary: Error always on line 0
Product: CSSValidator
Version: CSS Validator
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: CSS 2.0
AssignedTo: ot@w3.org
ReportedBy: uzi@landsmanns.com
QAContact: www-validator-cvs@w3.org
When I run my program using the css editor on the following css file:
.test {
background-color_: AliceBlue;
}
I get the following output:
> java CssTest
exception: org.w3c.css.parser.CssParseException: Property background-color_
doesn't exist
line: 0
...when it should be line 2.
The program is as follows:
import java.net.MalformedURLException;
import java.net.URL;
import org.w3c.css.css.StyleSheet;
import org.w3c.css.css.StyleSheetOrigin;
import org.w3c.css.css.StyleSheetParser;
import org.w3c.css.parser.CssError;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.Warning;
public class CssTest {
public static void main(String[] args) {
ApplContext ac = new ApplContext("en");
String fileName = "C:\\Dev\\css-validator\\test.css";
URL url = null;
try
{
url = new URL("file", "/", fileName);
}
catch(MalformedURLException murle)
{
murle.printStackTrace();
}
String title = "title";
String kind = "stylesheet";
String media = null;
StyleSheetParser parser = new StyleSheetParser();
parser.parseURL(ac, url, title, kind, media,
StyleSheetOrigin.AUTHOR);
StyleSheet style = parser.getStyleSheet();
CssError[] errors = style.getErrors().getErrors();
Warning[] warnings = style.getWarnings().getWarnings();
for (int i = 0; i < errors.length; i++) {
CssError cssError = errors[i];
System.err.println("error: " + cssError);
}
}
}
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
Received on Sunday, 26 September 2004 21:32:31 UTC