Re:Markdeep markup language
by tannhaeuser on Saturday August 04, 2018 @12:46PM
(#17687516)
To go beyond generic Wiki syntax, SGML lets you define context-specific token replacement rules. For example, to make SGML format a simplistic markdown fragment into HTML, you could use an SGML prolog like this:
[ Parent
| on HN ]
Re:Markdeep markup language
by eponeponepon on Saturday August 04, 2018 @05:04PM
(#17688421)
How does the parser distinguish between in-p and in-em to substitute in the corresponding entities? It seems to me that when it reaches the second asterisk it's not going to be able to know whether to open or close the em element.
Is this one of those pieces of occult witchery that SGML excels at..?
Re:Markdeep markup language
by tannhaeuser on Saturday August 04, 2018 @05:40PM
(#17688550)
If the context (top-most) element is "em", the "in-em" shortref map is current (as per the second USEMAP declaration), which defines the replacement text for "*" to be "</em>", ending the emphasized text span. Whereas within "p", it's "<em>", starting an emphasized text span, and making "em" the context element.
so XML removed the best part of SGML..
XML was always intended more for machine than for human consumption. It's easier for machines to consume extremely regular syntax, so that's what XML has.
unfortunately it had its time as a pseudo programming language period..
> unfortunately it had its time as a pseudo programming language period..
You are quite right. I should probably have said something more like "XML was intended by its creators more for machine than human consumption" (and, incidentally, creation; I think I have read that XML construction wasn't really intended to be done by humans either).
There’s XSLT Markdown to HTML converters out there. And while XSL isn’t XML, it is in every browser and available next to XML in near enough everything else.
Re:Markdeep markup language
by Mikhail_Edoshin on Sunday August 05, 2018 @04:51AM
(#17690395)
Yes, it's not only everywhere, it's nothing less than a second programming language for the web, although very much neglected :)