3 ms·
What does HTML have that XML doesn't have? Isn't XML a superset of HTML?
by t-writescode 6y ago
What does HTML have that XML doesn't have? Isn't XML a superset of HTML?
- recursivedoubts 6y agoIt has a hypermedia spec: https://www.w3.org/TR/html4/ https://www.w3.org/TR/html4/ And a bunch of things called "browsers" that implement that spec. More or less. I mean, come to that, aren't XML and HTML both just text? Isn't text, then, a hypertext? One can embed URLs in text, after all...
- t-writescode 6y agoDoes this mean that your argument that json can't be a hypertext is because it doesn't already have a universal hypermedia spec?
- recursivedoubts 6y agoThe language here is getting a little squirrly. "Can't be a hypertext" is too restrictive. "Isn't a hypertext" is how I would say it. JSON as JSON isn't a hypertext in the same way that XML as XML isn't a hypertext. XHTML is a hypertext based on XML. (HTML itself isn't proper XML.) There are hypertext specs based on JSON, such as: https://json-schema.org/draft-04/json-schema-hypermedia.html https://json-schema.org/draft-04/json-schema-hypermedia.html But, without clients that treat the data as a uniform interface, it's all mostly pointless, which is why most JSON APIs stop at Level 2 of the Richardson Maturity Model, and why things like GraphQL are becoming more and more popular. In the original model of the web (which is what Fielding was describing w/ REST) where HTML was being delivered to a browser, the uniform interface works: a browser has no idea what the HTML document means but can render it to a form that the human looking at it can make sense of.
- t-writescode 6y agoThank you for clarifying your stance
- gtramont 6y agoMaybe the following links can help in understanding hypertext/hypermedia? http://amundsen.com/hypermedia/hfactor/ http://amundsen.com/hypermedia/hfactor/ https://gtramontina.com/h-factors/ https://gtramontina.com/h-factors/