Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

well, I know XPath 1.0 was released in 1999 because I was doing stuff with it.

CSS 2 as I remember was some years after that, and googling it seems to be August 2002.

At any rate in this example

//*[contains(concat(' ', normalize-space(@class), ' '), ' foo ')]

I don't think the interest in using XPath is at all related to being able to check what class an element has, and in fact the linked discussion does not have anything to do with that, so I mean yeah, that's pretty bad but not anything anyone is asking to do in this scenario.



> CSS 2 as I remember was some years after that, and googling it seems to be August 2002.

You're thinking about CSS 2 revision 1 aka CSS 2.1

> I don't think the interest in using XPath is at all related to being able to check what class an element has

The original comment in the thread was

> It would have made sense to use XPath for CSS selectors

Being able to check what class an element has would be absolutely critical to that use-case.


ah yeah, forgot we were in thread and was thinking about the post itself.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: