7 ms·
Making SGML a thing again
From the XML Prague tweets, I get the impression that SGML is a thing again in the markup community. Opinions?
[1]: https://twitter.com/search?f=tweets&vertical=default&q=%23xmlprague%20OR%20%40xmlprague
[2]: http://sgmljs.net/docs/html5-dtd-slides-wrapper.html
[3]: https://www.youtube.com/watch?v=jy-b4jeJSas&index=14&list=PLQpqh98e9RgUcEmbXmI6RolisQaIRw9dm
- curuinor 10y agoSnowclone of "make ___ great again" is literally the most contentious snowclone of 2016 I mean, are right-wing folks going to flock to SGML? Is this an American partisan deal? edit: cool beans, they changed title it is one of the most partisan phrases in recent decades
- tannhaeuser 10y agoI'm sorry, you're probably ... right. #makesgmlgreatagain was tweeted at the conference. edit: changed title
- tannhaeuser 10y agoSGML an American partisan deal? LOL Considering people into markup are really frustrated with the 'net they once created in an open/liberal mindset being used for propaganda against them. edit: hey why the downvotes? I was really laughing about the phrase in this context
- yellowapple 10y agoI don't think SGML really ever wasn't a thing; it just took off some of its clothes and started calling itself "XML" instead.
- tannhaeuser 10y agoYes, but unlike XML, SGML can deal with HTML (arguably the most important markup application). I mean, XHTML didn't happen, so let's go back one step to XML's superset SGML which can do everything that XML can, and more. OTOH, the reaction of some people on the XML conference was like "what's this non-standard SGML thing?". Nevermind the fact that SGML is an ISO (United Nations) standard; doesn't get any more standard than that (with the possible exception of The Counsel of the Galactic Federation).
- yellowapple 10y ago"SGML can deal with HTML" Last I checked, that stopped being true as of HTML5.
- tannhaeuser 10y agoAccording to the analysis [1], the material issues that SGML has with HTML are - lexical issues; in particular, id/href values can be almost anything in HTML5, and are case-sensitive unlike other name-like tokens; note that while id/href values can be anything, they are however effectively constrained by other specification rules (eg. id values can't effectively contain quote characters because of attribute parsing rules) - script parsing is especially foobar'd (and injection-prone) in HTML (cruft from HTML3/HTML4 times) - HTML 5.1 constrains attributes on elements depending on the value of other attributes (possibly on parent element attributes), and also makes content model features dependent on parent attributes in some cases, which can't be described by an SGML DTD grammar (but then doesn't have to be described for parsing) YMMV but none of these things really matter that much in practice. [1]: http://sgmljs.net/docs/html5.html http://sgmljs.net/docs/html5.html
- yuhong 10y agoThere is also the issues with the EMBED tag, but plug-ins are dying.
- yuhong 10y agoThat being said, even IE9+ can deal with XHTML now, but the entire document must confirm to XML rules and this might not be always acceptable.
- tannhaeuser 10y agoIE9? That was about the time I last did a site using XHTML (2010?) and two years before W3C ditched their XHTML efforts officially.
- dragonwriter 10y agoXML was a generalization of HTML, which was itself an application of SGML (before, you know, it wasn't anymore), but XML isn't really as general as SGML.
- kedean 10y agoXML is parallel to HTML, not a generalization. Valid HTML is not a subset of XML. We tried making HTML a subset of XML, with XHTML, and it was probably the biggest language standardization failure of all time. XML's only good applications are in publishing non-editable feeds and data. When human-editability is required, it's just too strict for the world.
- tannhaeuser 10y agoWith "we" do you mean yourself personally, or rather as in "we, the markup community"? It's true that XHTML didn't came to be, but that's no reason to give up on structuring web content alltogether. A lot of workflows now are HTML-centric, and the used vocabularies are subsets/specializations/customizations of HTML. That's one area where SGML shines IMHO.
- kedean 10y agoStructuring is great, I agree. I meant specifically that the web community's attempt at applying XML principles to HTML was a failure. I believe that the reason is simply that it was structured in the wrong way. It focused more on how you format text than how you structure what the markup is representing. I think the semantic web is the right direction, where structuring is on the onus of the writer.
- tannhaeuser 10y agoSemantic markup for the web was on the roadmap back when XHTML was worked on, but I'm not sure it ever had a chance of adoption because the use cases for the web were (and are) infinite. Semantic web (RDFa), OTOH, can assert logical properties for arbitrary pieces of markup text; in particular, it's not necessary to use a "semantic" markup style (such as eg. DocBook). On the conference, Steven Pemberton, who is such an inspiring guy to meet, and also of ABC (Python's precursor) fame, gave a talk worth watching on YouTube. He was involved in XHTML on behalf of W3C.
- lightlyused 10y agoI remember using some product, db-publisher I think it was called, back in the early 90's that used sgml. This was before I had heard about the web.