[Haskell-cafe] ANN: hxt-css 0.1.0.0, a CSS selector engine for HXT

Mateusz Kowalczyk fuuzetsu at fuuzetsu.co.uk
Fri Oct 3 19:19:24 UTC 2014


On 10/03/2014 07:52 PM, Marios Titas wrote:
> I wrote this a few years ago as part of bigger project. After
> examining HandsomeSoup, I found that it produces incorrect results in
> many cases (e.g. the > relation or the :first-child pseudo class do
> not work correctly, or sometimes it returns non element nodes which is
> not allowed by the css spec), it supports a more limited subset of CSS
> (than hxt-css) and has unrelated dependencies (such as HTTP). Since I
> had already written this code, I decided to release it as a stand
> alone package even though there was a similar package in hackage
> already.
> 
> - Marios

Cool, I was just wondering. I will consider switching to hxt-css next
time I work on one of my projects using HandsomeSoup. I'm not a heavy
user of it (in fact I try very hard to have as little to do with web
things as possible) so I never noticed it behaved badly, good to know!

> On Fri, Oct 3, 2014 at 7:40 PM, Mateusz Kowalczyk
> <fuuzetsu at fuuzetsu.co.uk> wrote:
>> On 10/03/2014 07:37 PM, Marios Titas wrote:
>>> Hello everybody,
>>>
>>> I'd like to announce the first public release of hxt-css, a CSS selector
>>> engine for the Haskell XML Toolbox (HXT). Its main design goals are:
>>>
>>> * support as many CSS selectors as possible: it currently supports all
>>> CSS 3 selectors except the ones that do not make sense outside a web
>>> browser (e.g. such as :hover). For example, it supports weird things
>>> like
>>>
>>>     div > span + p:not(:nth-of-type(3n-1))
>>>
>>> * try to be 100% correct: in all tests I ran, the output of
>>> hxt-css was identical to that of firefox & chrome.
>>>
>>> * follow the conventions of other hxt packages: for
>>> example, error reporting is done the same way as hxt-xpath.
>>>
>>> Note, there is already a similar package in hackage called HandsomeSoup.
>>>
>>> - Marios
>>
>> Can you explain how this differs from HandsomeSoup?
>>
>>
>> --
>> Mateusz K.
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe


-- 
Mateusz K.


More information about the Haskell-Cafe mailing list