It's simple to parse like JSON, it has namespaces like XML (but better), and it doesn't require you to repeat the name of every element twice.
It's simple to parse like JSON, it has namespaces like XML (but better), and it doesn't require you to repeat the name of every element twice.
I think some straightforward YAML schema for representing HTML 5, may have more traction because both are existing languages so not much extra tooling would be required. I could for instance write my Web blog in YAML that is unambigously and simply compiled into HTML 5 (without sacrificing a _single feature_ of the latter), so I don't have to actually type HTML (5). Not everyone uses React or JSX or what have you, and Markdown implementations in practice are often lacking for truly rich blog articles. Then again, if you have a blog article with interactice diagrams, sliders and ad-hoc questionnaires, _XML_ (or a YAML representation thereof, for much the same reason as outlined earlier) _is_ IMO a good language _in form_ -- I have used XSLT with good effect to just stick to a domain-specific language for my blog articles, and have a single XSL stylesheet render uniform HTML page linked to a CSS stylesheet that was basically a posterchild for the coveted content-presentation separation in practice.
Also completely with you on wanting a language I can use to losslessly write HTML, and CSTML does that too. That docs page on CSTML is written in CSTML for example: https://github.com/bablr-lang/bablr-docs/blob/trunk/src/cont...
I also think the path to adoption for CSTML is eased considerably by the fact that most CSTML documents will be produced as parser or WYSIWYG editor output rather than hand-written. And yeah, the whole world of XSLT opens back up again with this tech. I loved the idea behind XSLT. It was a great idea. It created a much richer semantic internet, and then let visual presentation be a concern purely secondary to semantics.