You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Mark Morin <ma...@telusplanet.net> on 2001/10/17 01:19:34 UTC

Handling of CSS parsing errors

I'm trying to use Batik's CSS parser for parsing XML style sheets.  Since I haven't taught it about many of the properties yet, it raises an error when it sees an unknown property and doesn't seem to parse any of the properties or rules that come afterwards.  Is this the correct behavior?  My reading of 


Re: Handling of CSS parsing errors

Posted by Stephane Hillion <sh...@ilog.fr>.
On Wednesday 17 October 2001 17:38, Mark Morin wrote:
> Thanks, at least I know I'm reading the spec right.
>
> However, I think this also applies to Batik.  For example
> with the following two files the text is black not red.
> I then tried it as an internal style sheet and as an inline
> style.  Both of these present an error dialog.
>
> ***test.svg***
> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000802//EN"
> "http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.dtd">
> <?xml-stylesheet type="text/css" href="test.css" ?>
> <svg>
> <text y="15">Invalid Property Test</text>
> </svg>
>
>
> ***test.css***
> text {
>   badproperty: stuff;
>   fill: red;
> }
>

The decision of reporting CSS errors in Batik was made because:
  - the project is in an early phase of development and it helps to find bugs,
  - SVG is a new language and there is no forward compatibility issue for now.

> ----- Original Message -----
> From: "Stephane Hillion" <sh...@ilog.fr>
> To: "Batik Users" <ba...@xml.apache.org>
> Sent: Wednesday, October 17, 2001 2:35 AM
> Subject: Re: Handling of CSS parsing errors
>
> > On Wednesday 17 October 2001 01:22, Mark Morin wrote:
> > > I'm trying to use Batik's CSS parser for parsing XML style sheets.
>
> Since I
>
> > > haven't taught it about many of the properties yet, it raises an error
>
> when
>
> > > it sees an unknown property and doesn't seem to parse any of the
>
> properties
>
> > > or rules that come afterwards.  Is this the correct behavior?  My
>
> reading
>
> > > of
> > >
> > > http://www.w3.org/TR/REC-CSS2/syndata.html#parsing-errors
> > >
> > > seems to say it should just skip the property.
> >
> > It's up to you to ignore these errors in your application to be compliant
> > with the CSS spec.
> > --
> >   Stephane.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: batik-users-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: Handling of CSS parsing errors

Posted by Mark Morin <ma...@telusplanet.net>.
Thanks, at least I know I'm reading the spec right.

However, I think this also applies to Batik.  For example
with the following two files the text is black not red.
I then tried it as an internal style sheet and as an inline
style.  Both of these present an error dialog.

***test.svg***
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000802//EN"
"http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.dtd">
<?xml-stylesheet type="text/css" href="test.css" ?>
<svg>
<text y="15">Invalid Property Test</text>
</svg>


***test.css***
text {
  badproperty: stuff;
  fill: red;
}

----- Original Message -----
From: "Stephane Hillion" <sh...@ilog.fr>
To: "Batik Users" <ba...@xml.apache.org>
Sent: Wednesday, October 17, 2001 2:35 AM
Subject: Re: Handling of CSS parsing errors


> On Wednesday 17 October 2001 01:22, Mark Morin wrote:
> > I'm trying to use Batik's CSS parser for parsing XML style sheets.
Since I
> > haven't taught it about many of the properties yet, it raises an error
when
> > it sees an unknown property and doesn't seem to parse any of the
properties
> > or rules that come afterwards.  Is this the correct behavior?  My
reading
> > of
> >
> > http://www.w3.org/TR/REC-CSS2/syndata.html#parsing-errors
> >
> > seems to say it should just skip the property.
> >
>
> It's up to you to ignore these errors in your application to be compliant
> with the CSS spec.
> --
>   Stephane.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: Handling of CSS parsing errors

Posted by Stephane Hillion <sh...@ilog.fr>.
On Wednesday 17 October 2001 01:22, Mark Morin wrote:
> I'm trying to use Batik's CSS parser for parsing XML style sheets.  Since I
> haven't taught it about many of the properties yet, it raises an error when
> it sees an unknown property and doesn't seem to parse any of the properties
> or rules that come afterwards.  Is this the correct behavior?  My reading
> of
>
> http://www.w3.org/TR/REC-CSS2/syndata.html#parsing-errors
>
> seems to say it should just skip the property.
>

It's up to you to ignore these errors in your application to be compliant 
with the CSS spec.
--
  Stephane.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: Handling of CSS parsing errors

Posted by Mark Morin <ma...@telusplanet.net>.
Oops - hit go before I was done.

----- Original Message -----
From: Mark Morin
To: batik-users@xml.apache.org
Sent: Tuesday, October 16, 2001 5:19 PM
Subject: Handling of CSS parsing errors


I'm trying to use Batik's CSS parser for parsing XML style sheets.  Since I
haven't taught it about many of the properties yet, it raises an error when
it sees an unknown property and doesn't seem to parse any of the properties
or rules that come afterwards.  Is this the correct behavior?  My reading of

http://www.w3.org/TR/REC-CSS2/syndata.html#parsing-errors

seems to say it should just skip the property.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org