2 ms·
Linked original doc is at [1]. Interesting tidbits: > <H1>, <H2>, <H3>, <H4>, <H5>, <H6> > > These tags are kept as defined in the CERN SGML guide. Their defi
by tannhaeuser 7y ago
Linked original doc is at [1].
Interesting tidbits:
> <H1>, <H2>, <H3>, <H4>, <H5>, <H6>
>
> These tags are kept as defined in the CERN SGML guide. Their definition is completely historical, deriving from the AAP tag set.
This probably refers to [2].
Oh, and
> ...(not good SGML)...: <NEXTID 27>
This is in fact no SGML at all (NoSGML?), because SGML attribute minimization allows to leave out the attribute name if it can be uniquely identified using an enumerated token value but not arbitrary numbers eg. the following is valid:
<!ELEMENT e - - ANY>
<!ATTLIST e myatt (true|false) #IMPLIED>
...
<e true>
and short form for
<e myatt="true">
[1]: https://www.w3.org/History/19921103-hypertext/hypertext/WWW/MarkUp/Tags.html https://www.w3.org/History/19921103-hypertext/hypertext/WWW/...
[2]: https://en.wikipedia.org/wiki/SGMLguid https://en.wikipedia.org/wiki/SGMLguid
- nabla9 7y agoHTML DTD was made later and bugs were fixed in the first first standard proposal in 1993. Real world HTML in the wild frequently failed to validate, so the fact that HTML was SGML application became irrelevant almost instantly. Nobody parsed HTML using SGML parsers with DTD.
- tannhaeuser 7y agoThe official W3C validator site [1] begs to differ. And I am, in fact, parsing lots of HTML5 using SGML (see eg. [2], prepared for an ACM DocEng 2019 workshop with a focus on preserving and aquiring HTML5 corpora into document engineering and ML approaches for search, text extraction/summarization, etc.) [1]: https://validator.w3.org/ https://validator.w3.org/ [2]: http://sgmljs.net/docs/sgml-html-tutorial.html http://sgmljs.net/docs/sgml-html-tutorial.html
- nabla9 7y agoThe official W3C validator site seems to agree with me. Did you misunderstand what I said or can show me wrong. Just feed to it any widely used webpage, for example https://news.ycombinator.com/ https://news.ycombinator.com/ and it will not pass. Just be be clear, just because there are still uses for SGML does not make it relevant in the big picture. Your use case seems to be the exception.
- tannhaeuser 7y agoDon't know what you did exactly, but the official W3C validator site uses 20 year old DTDs for DTD-based validation, but then HN's markup uses presentational elements/attributes from the HTML4 transitional/loose era intended to ease migration to CSS back then. The errors show exactly what's wrong with HN's markup eg. missing "alt" attribute on images where required, use of long-obsolete elements, missing DOCTYPE, etc. so I guess it's working as expected in suggesting improvements to your site's markup, doesn't it? FYI: if you want to parse modern HTML 5 using SGML (with my HTML5 "mini"-DTD), see [1]. For example to check the HN homepage, download it using curl, then add a DOCTYPE to it ('<!DOCTYPE html SYSTEM "about:legacy-compat">'), then invoke "sgmlproc" on it, and it'll just work and parse without errors (see downloads and instructions on linked page). [1]: http://sgmljs.net/docs/parsing-html-tutorial/parsing-html-tutorial.html http://sgmljs.net/docs/parsing-html-tutorial/parsing-html-tu...
- nabla9 7y agoYes, but that is not relevant to my argument. Validator validating is irrelevant. HN's markup is not wrong because it works. You use sgmljs to deal with the unnecessary mess that SGML/HTML/XML started. ps. Since you seem to know this stuff, where I can find standard DTD for DTD before XML. DTD was defined using DTD, right?
- tannhaeuser 7y agoNot sure what you're after exactly but DTDs were introduced with SGML (ISO 8879:1986 [0]) and then used in simplified form with XML (which is specified as a simplified profile of SGML [1]). The (historic) SGML-DTDs for HTML, including those used by W3C's validator and early IETF DTDs for HTML 2.0, can be found at W3C's site eg [2], [3]. [0]: https://www.iso.org/standard/16387.html https://www.iso.org/standard/16387.html [1]: https://www.w3.org/TR/REC-xml/ https://www.w3.org/TR/REC-xml/ [2]: https://www.w3.org/TR/html4/sgml/dtd.html https://www.w3.org/TR/html4/sgml/dtd.html [3]: https://www.w3.org/TR/2018/SPSD-html32-20180315/ https://www.w3.org/TR/2018/SPSD-html32-20180315/