<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>890</bug_id>
          
          <creation_ts>2004-09-26 21:32:30 +0000</creation_ts>
          <short_desc>Error always on line 0</short_desc>
          <delta_ts>2006-03-05 12:50:34 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>CSSValidator</product>
          <component>Other</component>
          <version>CSS Validator</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P1</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Uzi Landsmann">uzi</reporter>
          <assigned_to name="Yves Lafon">ylafon</assigned_to>
          <cc>patricka</cc>
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2370</commentid>
    <comment_count>0</comment_count>
    <who name="Uzi Landsmann">uzi</who>
    <bug_when>2004-09-26 21:32:30 +0000</bug_when>
    <thetext>When I run my program using the css editor on the following css file:

.test {
	background-color_: AliceBlue;
}

I get the following output:

&gt; java CssTest
exception: org.w3c.css.parser.CssParseException: Property background-color_ 
doesn&apos;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(&quot;en&quot;);
		String fileName = &quot;C:\\Dev\\css-validator\\test.css&quot;;
		URL url = null;
		try
		{
			url = new URL(&quot;file&quot;, &quot;/&quot;, fileName);
		}
		catch(MalformedURLException murle)
		{
			murle.printStackTrace();
		}
		String title = &quot;title&quot;;
		String kind = &quot;stylesheet&quot;;
		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 &lt; errors.length; i++) {
			CssError cssError = errors[i];
			System.err.println(&quot;error: &quot; + cssError);
		}
	}
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2463</commentid>
    <comment_count>1</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2004-10-06 01:34:46 +0000</bug_when>
    <thetext>*** Bug 209 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2464</commentid>
    <comment_count>2</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2004-10-06 01:35:54 +0000</bug_when>
    <thetext>Marking bugs to be fixed in priority</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>