W3C home > Mailing lists > Public > public-mobileok-checker@w3.org > June 2007

ACTION-516 [CTF] Evaluate how hard it would be to produce XML out of CSS stylesheets using SAC

From: Jo Rabin <jrabin@mtld.mobi>
Date: Fri, 15 Jun 2007 19:47:42 +0100
Message-ID: <C8FFD98530207F40BD8D2CAD608B50B43BC04D@mtldsvr01.DotMobi.local>
To: "public-mobileok-checker" <public-mobileok-checker@w3.org>

A status report on this action arising from our F2F in London this week.

This comes from Dom's throw-away line "couldn't you just ..." and my
taking the bait.

So the story so far:

I built a trivial framework around SAC and implemented a trivial
ContentHandler and ErrorHandler.

I used the Batik CSS Parser as the starting point - on the
recommendation of the SAC Home Page [1] which says that it is smaller
and faster than the W3C Flute implementation. It turns out that Batik
appears to get into a tangle on the first error and doesn't appear to
recover properly. So switching to the Flute implementation (slower,
bigger) it does appear to recover from errors properly - and my guess
would be that is why it is slower and bigger. But for our purposes, much
more appropriate. Though time will tell actually how well it works,
given that it appears not to pass through comments.

(It's an interesting question, I suppose, that the Batik parser appears
to contravene the spirit if not the letter of CSS parsing rules, and
consequently, perhaps it should appear with that caveat on the SAC home

So far as JXCSS is concerned, the implementation notes say that it
doesn't work with Flute, if I remember correctly, which is a limitation,
and it does not implement an error handler. Neither of these is a
terminal error , I guess, but it does raise the question of whether to
implement afresh - in reality copying much of what JXCSS does in its
document handler, or whether it makes sense to carry out surgery on
JXCSS itself and contribute it back.

I think that given Sean's military attitude to coding style :-) we are
probably better doing the former, with due acknowledgement, of course,
to where code has been 'borrowed'.

There's of course the issue of error messages ... 

... so the conclusion seems to be that the answer is 'yes' - I am not
going to be able to do much more work on this over the next week or so.


[1] http://www.w3.org/Style/CSS/SAC/
Received on Friday, 15 June 2007 18:48:03 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:21:18 UTC