|
|
|
|
|
by Mikhail_Edoshin
302 days ago
|
|
The appeal of XML is semantic. I think about things in a certain way. I write the text the way I think, inventing XML elements and structure as I go. Then I transform it into whatever. This obscures the semantic, but the transformation is transient, merely to present this to the user. To do this dynamically I serve the content as I wrote it with a single processing instruction that refers to a stylesheet. This is elegant, isn't it? It is less efficient than a static site, but not that different from a typical HTML: HTML, CSS, JS. It is also trivial to change it to build statically (or to embed all the resources and XSLT into individual XML files, although this would be strange.) And if browsers supported alternative stylesheets it would be trivial to provide alternative renderings at the cost of one processing instruction per rendering. Why don't they? Isn't this puzzling? I think it is even in the specification. |
|
Of course everyone is free to create things they want with their own abstractions, but let's not pretend that it's an optimal solution. Elegance and optimal are often at odds.