top | item 44990629

(no title)

sennalen | 6 months ago

keeping data orthogonal to presentation

discuss

order

ioasuncvinvaer|6 months ago

How is html not data?

blincoln|6 months ago

HTML is data and presentation all in one. The idea with XML + XSLT is that the XML contains the raw, structured data, and one or more XSLTs define how to present it.

It's similar to a modern web app talking to a REST API to get raw data in JSON form and then using that data in some user-friendly rendered web page. Except it's a standard that anyone can use, instead of everyone rolling their own client-side browser code.

Of course, XML is so complicated that it fell out of favour, but that was the idea.

pas|6 months ago

it can be, but because it started as an SGML language (and nowadays who knows what it is) it allows ambiguous structures, plus it doesn't support arbitrary tags, whereas in XML the structure is strict but the tag schema is completely free.