3 ms·
Aside from the spec wanting you to provide a schema, this is pretty much what xhtml aimed to do. The idea was that you could make the tags describe the content
by extraduder_ire 3y ago
Aside from the spec wanting you to provide a schema, this is pretty much what xhtml aimed to do. The idea was that you could make the tags describe the content in them, and not have to rely on what's built into a common spec.
HTML is and always was very error tolerant though.
- hgyjnbdet 3y agoSo XML in truth then?
- formerly_proven 3y agoI think you're thinking about XML + XSLT transforming the domain XML into XHTML in the browser.
- speedgoose 3y agoYou can also attach a CSS to a XML document to specify how to present it. No need to touch XSLT.
- SJC_Hacker 3y agoIts not simply styling, it goes beyond that. XML was/still intended to be the equivalent of JSON - just the data. With XSLT you created entirely new structure based on the underlying XML. The W3schools example is fairly decent https://www.w3schools.com/xml/xsl_intro.asp https://www.w3schools.com/xml/xsl_intro.asp Somehwhat similar to how component based JS frameworks work nowadays. Anyone who was using at a CSS equivalent was missing the point.
- TazeTSchnitzel 3y agoYou don't have to do it that way. You can embed arbitrary foreign (but appropriately namespaced) XML into an XHTML document and style it with CSS, untransformed. Or, as the sibling comment says, you can even avoid XHTML and style pure XML directly.