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 Martin Zdila <m....@mwaysolutions.com> on 2008/05/27 12:14:44 UTC
skipping unknown functions
hello
is it possible to make CSS parser to skip errors? I have CSS file that also
contains CSS3 functions. Batik CSS parser stops parsing CSS when it parses
it:
/* until here CSS is parsed */
FOO:nth-child(even) {
}
/* not parsed here */
I've attached patch that ignores unknown functions.
BTW it there somebody alive on the mialing list? I am getting no response to
my mails...
br
--
Martin Zdila ~/skip-unknown-functions-patch.diff
CTO
M-Way Solutions Slovakia s.r.o.
Letna 27, 040 01 Kosice
Slovakia
tel:+421-908-363-848
mailto:m.zdila@mwaysolutions.com
http://www.mwaysolutions.com
xmpp:zdila@jabbim.sk (Jabber)
skype:m.zdila
Re: skipping unknown functions
Posted by Cameron McCormack <ca...@mcc.id.au>.
Hi Martin.
Martin Zdila:
> Is this feature actually planned? If yes, then when do you expect it?
It’s something I’d like to do, but really have no time for for a while.
> Just to let you know, I am using CSS parsing library to parse ugly and wild
> CSS found in the many WWW pages on the Internet. The result is DOM (using
> JXCSS library). Then I extract some information and modify the DOM. Finally I
> transcode DOM back to CSS using XSLT and send it back to browser. Our tool is
> something like special HTTP proxy.
OK.
> Unfortunately there are many ugly CSS documenst on the Internet and Batik CSS
> parser error handling is very different from that found in the major
> webbrowsers. Maybe if you know about better CSS parsing library... ;-)
Of course, you’re always welcome to contribute code to add forwards-
compatible parsing to Batik’s CSS parser. Just Googling I can find a
couple of other CSS engines in Java, but I don’t know how good they
might be.
--
Cameron McCormack ≝ http://mcc.id.au/
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: skipping unknown functions
Posted by Martin Zdila <m....@mwaysolutions.com>.
Hello
First, thanks for your reply, Cameron.
> > is it possible to make CSS parser to skip errors? I have CSS file that
> > also contains CSS3 functions. Batik CSS parser stops parsing CSS when it
> > parses it:
> >
> > /* until here CSS is parsed */
> > FOO:nth-child(even) {
> > }
> > /* not parsed here */
>
> I think it would be good for the CSS engine to have a forward-compatible
> parsing mode (i.e., to skip unknown constructs according to
> http://www.w3.org/TR/CSS21/syndata.html#parsing-errors), but I would
> rather have a more complete solution than just skipping unknown
> pseudo-classes.
Is this feature actually planned? If yes, then when do you expect it?
Just to let you know, I am using CSS parsing library to parse ugly and wild
CSS found in the many WWW pages on the Internet. The result is DOM (using
JXCSS library). Then I extract some information and modify the DOM. Finally I
transcode DOM back to CSS using XSLT and send it back to browser. Our tool is
something like special HTTP proxy.
Unfortunately there are many ugly CSS documenst on the Internet and Batik CSS
parser error handling is very different from that found in the major
webbrowsers. Maybe if you know about better CSS parsing library... ;-)
BR
--
Martin Zdila
CTO
M-Way Solutions Slovakia s.r.o.
Letna 27, 040 01 Kosice
Slovakia
tel:+421-908-363-848
mailto:m.zdila@mwaysolutions.com
http://www.mwaysolutions.com
xmpp:zdila@jabbim.sk (Jabber)
skype:m.zdila
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: skipping unknown functions
Posted by Cameron McCormack <ca...@mcc.id.au>.
Hi Martin.
Martin Zdila:
> is it possible to make CSS parser to skip errors? I have CSS file that also
> contains CSS3 functions. Batik CSS parser stops parsing CSS when it parses
> it:
>
> /* until here CSS is parsed */
> FOO:nth-child(even) {
> }
> /* not parsed here */
>
> I've attached patch that ignores unknown functions.
I think it would be good for the CSS engine to have a forward-compatible
parsing mode (i.e., to skip unknown constructs according to
http://www.w3.org/TR/CSS21/syndata.html#parsing-errors), but I would
rather have a more complete solution than just skipping unknown
pseudo-classes.
> BTW it there somebody alive on the mialing list? I am getting no response to
> my mails...
We are here, just not able to reply to mails so quickly.
--
Cameron McCormack ≝ http://mcc.id.au/
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org