6 ms·
HTML was historically an application of SGML, and SGML could do includes. You could define a new "entity", and if you created a "system" entity, you could refer
by dwheeler 1y ago
HTML was historically an application of SGML, and SGML could do includes. You could define a new "entity", and if you created a "system" entity, you could refer to it later and have it substituted in.
<!DOCTYPE html example [
<!ENTITY myheader SYSTEM "myheader.html">
]>
....
&myheader;
SGML is complex, so various efforts were made to simplify HTML, and that's one of the capabilities that was dropped along the way.
- lkuty 1y agoIt existed also in DTD (Document Type Definition) used with HTML 4 and below, and XML. Came fromn SGML too I guess.
- tannhaeuser 1y agoYes it did, and there are HTML 5.x DTDs for HTML versions newer than HTML 4.x ar [1], including post-HTML 5.2 review drafts until 2023; see notes at [2]. [1]: https://sgmljs.net/docs/html5.html https://sgmljs.net/docs/html5.html [2]: https://sgmljs.net/blog/blog2303.html https://sgmljs.net/blog/blog2303.html
- int_19h 1y agoWe also had a brief detour into XML with XHTML, and XML has XInclude, although it's not a required feature.
- echelon 1y agoIt's too bad we didn't go down the XHTML/semantic web route twenty years ago. Strict documents, reusable types, microformats, etc. would have put search into the hands of the masses rather than kept it in Google's unique domain. The web would have been more composible and P2P. We'd have been able to slurp first class article content, comments, contact details, factual information, addresses, etc., and built a wealth of tooling. Google / WhatWG wanted easy to author pages (~="sloppy markup, nonstandard docs") because nobody else could "organize the web" like them if it was disorganized by default. Once the late 2010's came to pass, Google's need for the web started to wane. They directly embed lifted facts into the search results, tried to push AMP to keep us from going to websites, etc. Google's decisions and technologies have been designed to keep us in their funnel. Web tech has been nudged and mutated to accomplish that. It's especially easy to see when the tides change.
- riffraff 1y agoI kinda agree with you but I'd argue the "death" of microformats is unrelated to the death of XHTML (tho schema.org is still around). You could still use e.g. hReview today, but nobody does. In the end the problem of microformats was that "I want my content to be used outside my web property" is something nobody wants, beyond search engines that are supposed to drive traffic to you. The fediverse is the only chance of reviving that concept because it basically keeps attribution around.
- throwaway346434 1y agoJSON LD is alive and kicking.
- kweingar 1y agoI don't think there was ever a sustainable route to a semantic web that would work for the masses. People wanted to write and publish. Only a small portion of people/institutions would have had the resources or appetite to tag factual information on their pages. Most people would have ignored the semantic taxonomies (or just wouldn't have published at all). I guess a small and insular semantic web is better than no semantic web, but I doubt there was a scenario where the web would have been as rich as it actually became, but was also rigidly organized.
- deleted 1y ago[deleted]
- elevaet 1y agoAlso even if you do have good practices of semantic tagging, there are huge epistemological problems around taxonomies - who constructs them, what do the terms actually mean, how to organize them and so on. In my experience trying to work with wikidata taxonomies, it can be a total mess when it's crowdsourced, and if you go to am "expert" derived taxonomy there are all kinds of other problems with coverage, meaning, democracy. I've had a few flirtations with the semantic web going back to 2007 and long ago came to the personal conclusion that unfortunately AI is the only viable approach.
- tannhaeuser 1y agoThe XML subset of SGML still includes most forms of entity usage SGML has, including external general entities as described by grandparent. XInclude can include any fragment not just a complete document, but apart from that was redundant, and what remains of XInclude in HTML today (<svg href=...>) doesnt't make use of fragments and also does away with the xinclude and other namespaces. For reusing fragments OTOH, SVG has the more specific <use href=...> construct. XInclude also really worked bad in the presence of XML Schema.
- j45 1y agoNeat reference, going to look into that. The <object> tag appears to include/embed other html pages. An embedded HTML page: <object data="snippet.html" width="500" height="200"></object> https://www.w3schools.com/tags/tag_object.asp https://www.w3schools.com/tags/tag_object.asp
- nephyrin 1y ago<object> used like this is just a poor iframe in a much shakier spot in the standards, mostly for backwards compatibility. Like iframe, it "includes" a full subdocument as a block element, which isn't quite what the OP is hinting at.
- gpvos 1y agoSound like it's good enough for headers and footers, which is 80% of what people need.
- masklinn 1y agoThat’s what lots of sites used to do in the late 90s and early aughts in order to have fixed elements. It was really shit. Browser navigation cues disappear, minor errors will fuck up the entire thing by navigating fixed element frames instead of contents, design flexibility disappears (even as consistent styling requires more efforts), frames don’t content-size so will clip and show scroll bars all over, debugging is absolute ass, … And it increases resource use.
- j45 1y agoIt’s not ideal, but t it does exist in pure html… and the OP didn’t seem to note it. A bit of vanilla JavaScript with WebComponents is a few lines: https://gomakethings.com/html-includes-with-web-components/ https://gomakethings.com/html-includes-with-web-components/ Edit: “t” was supposed to be the object tag.
- masklinn 1y ago
- timewizard 1y agoWell, that is an entire attack surface, on it's own. https://en.wikipedia.org/wiki/Billion_laughs_attack https://en.wikipedia.org/wiki/Billion_laughs_attack
- bawolff 1y agohttps://en.wikipedia.org/wiki/XML_external_entity_attack https://en.wikipedia.org/wiki/XML_external_entity_attack would be the more relavent link.