143 points · by norswap · 6y ago · 110 comments
> this is a proposal for querying the HTML DOM with XPath, not XML.
> Per https://www.chromestatus.com/metrics/feature/popularity it does seem that about 1-2% of page views end up using XPath
One could argue whether a feature that has existed for over a decade and is only used by 1-2% of page views is worth improving, but that is not the argument that domenic is making here.
> Chrome is not interested in this. The XML parts of our pipeline are in maintenance mode...
> By "XML parts of our pipeline" I mean "everything implemented using libxml and libxslt".
His comment is that in the Chrome codebase, the XPath implementation is within some XML libraries, which are in maintenance mode. This may or may not be true for other browsers. It's interesting that these refer only to the implementation cost to Google, and does not make any reference to costs or benefits to other users of the web platform, which are discussed by other comments.
Overall, while there seem to be valid arguments both for and against the proposal, arguments for are being presented publicly in that thread while those against are being discussed elsewhere (perhaps at Google?), with only final, unchallengeable decisions being posted here. Domenic is fairly explicit in his refusal to engage in a discussion.
> As such, I won't be participating in this thread further. I think I've made our position clear.
Irrespective of whether you agree with the proposal itself, to an outsider like myself it looks like the process of discussion does not exist at WhatWG anymore, and that Google basically dictates terms.
Edit: moved a paragraph for clarity
> It's interesting that these refer only to the implementation cost to Google, and does not make any reference to costs or benefits to other users of the web platform, which are discussed by other comments.
A few months back Chrome shipped Constructible Stylesheets. The proposed specification was strictly opposed by other browser vendors, with Safari stating that they will not ever consider implementing them in the current state [1].
Chrome not only shipped it enabled by default, but refused to bring it back under a flag because "is used on about ~.8% of page loads in Chrome now" [1] (safe to assume, all of them are Google users and users of Google-developed libraries).
It's the most recent example (also backed up by numbers provided by Google themselves). I won't even mention the plethora of standards that other browser vendors consider harmful, but are enabled by default in Google.
So yes, Google is only concerned by the cost to Chrome, never by the costs or benefits to other users of the web platform.
> it looks like the process of discussion does not exist at WhatWG anymore, and that Google basically dictates terms.
That is true. The standards process (both w3c/whatwg and tc39) is hijacked by the same 3-4 people from Google, and decisions are rammed through irregardless of anyone.
[1] https://github.com/WICG/construct-stylesheets/issues/45#issu...
[2] https://github.com/WICG/construct-stylesheets/issues/45#issu...
Consider adjusting this number to remove any Google sites that are viewed (to remove Google's own bias/quasi browser monopoly) - and it probably goes up a lot more even.
XPath predates CSS selectors being exposed to JS, and it is absolutely clear that XPath had its best shot to move from niche to mainstream over a decade ago and it didn't happen.
> arguments for are being presented publicly in that thread while those against are being discussed elsewhere (perhaps at Google?)
It's right there at the end of the highlighted comment:
"we would love to [...] replace them with something that generates less security bugs. Increasing the capabilities of XML in the browser runs counter to that goal."
So security bugs in XML seems to be the main issue?
Chrome actually has two XPath engines. One is used for querying the HTML DOM with Javascript, the other one in libxml2 is only used for XSLT transformations. (XSLT support is the main reason why Chrome still uses libxml2. If they weren't relying libxslt which in turn requires libxml2, they would probably switch to a better suited XML parser like Expat or write their own.)
If that's the case, rewrite the whole lot into JavaScript, run it in the browser sandbox, and rip out the libxml that has security concerns. Then invite pull requests to add new versions of whatwg things.
As soon as a browser API is written in JavaScript and only using other public API's, it becomes a near zero maintenance burden.
One thing I see regularly is Chrome’s web caching being so aggressive it is driving front-end developers to start using FF for dev.
We simply need to stand back and let time take its course.
https://bugs.chromium.org/p/chromium/issues/detail?id=514995
which was already nuts, so they are clearly not interested in anything related to XML. XML is a fantastic tool, it's just that a whole generation of developers refused to even touch it and are biased against it.
And since Chrome is now basically the web... wait til there is only Chrome and Safari left and see what happens to web "standards"...
Whoever thought it is a good idea for complex configs (kubernetes) was wrong
Kinda agree, YAML is a mess wrt. many aspects.
> I changed my opinion of XML after I had to deal with yaml.
I still didn't change my opinion about XML, it is similar a mess wr. many aspects.
For both there is a sane sub-set which isn't a mess and which looks reasonable fine. Sadly this subset has not necessary clear borders.
So I guess a sub-set of XML, i.e. XML reinvented in 2020 would probably be better then YAML. But then you could also do a YAML reinvented in 2020 ;=)
But then, it's not like YAML is any better with how confusing its whitespace rules can be, and all the short-hand ways of avoiding explicit syntax (see: do you indent arrays in a hash or not? What's up with having to double-indent in some cases but not another?). And given the length of many yaml-based configs, it becomes pretty much useless once you're a thousand lines in, which you'll easily approach with a CI config.
At least with XML, you could actually attach a stylesheet to it (even just CSS) and you'd automatically have a human readable version of the file, without having to bother with converting YAML or JSON or whatever. That'd simplify the generation of a lot of internal dashboards.
Also, there is a whole world outside of software development: The world, that uses this software. And that world produces documents, that need to be managed. And those, who manage them, are users, not programmers.
Google Chrome hasn't implemented MathML yet, even though Firefox and Safari have: https://caniuse.com/mathml
https://caniuse.com/push-api https://caniuse.com/mediasource
https://www.zdnet.com/article/apple-declined-to-implement-16...
A lot of features are implemented late and incorrectly. I think that the first Safari version that supported PWAs was so broken that many had to manually exclude the browser in their support detection code.
they appear to be bloated mainly because of two reasons:
1) companies pulling in all sort of un-optimized content and making requests to a huge amount of external services, effectively slowing down the render of pages
2) a lot of developers developing stuff that should really be native code in html+js+css, which doesn't always perform that well and tends to slow down the whole browser. it really suffices one badly-coded app (not using well asynchronicity and/or wasting memory) to make the whole browser appear slow.
For instance, the RPM for the Firefox I'm using right now is 100 megabytes, and that's an already compressed format. After installing, just one of the components (libxul.so, which has most of the executable code) is over 110 megabytes.
Each new feature will only increase this size even more.
What would be useful however is improving the precision, xpath 1.0 had a pretty restricted set of functions which hampers filtering, you either need to bring too much back to JS or the selector becomes overly complex with painful cross-language escaping, especially when dealing with HTML trees (token lists are really painful to deal with just 1.0’s functions set).
Making exslt & applicable later functions available would be a huge boon without needing to change the langage itself.
E.g. https://tomforb.es/xcat-1.0-released-or-xpath-injection-issu...
But it does not seem to be mentioned as an argument.
Removing support for XPath kills MANY tests. I feel like a crazy person. Can someone help with context?
Pages are html and not neccessary xml compatible.
XPath is used for html independent of xml (because the structure is very similar and as such querying html with xml based query systems can work).
But for google it's part of their xml code base they don't want to touch.
XML is no longer relevant to the modern web
Standard PDFs are also not XML based.
PDF.js ab-uses HTML to somehow render PDF.
The HTML used by PDF.js is in no way a sane "human readable structured data" format. But a "browser compatible" ad-hoc representation for the underlying PDF representation.
Lastly PDF are not formats for structured data, which is what XML is all about in the end.
So I have no idea why you thing HTML+Js is a sane replacement for XML use cases, it isn't. It isn't a replacement to a degree that IMHO it doesn't even really makes sense (the JS part).
Context: This was named "Chrome holding the web back: an example", I expect moderation will change this at some point to something like "Chrome unlikely to support XPath 3.1" which is considerably less incendiary and something few people here care about.
Or "Chrome devs being against XPath 2+ spec because of internal maintenance problems"