← Back to context

Comment by _heimdall

3 months ago

JSON correlates to XML rather than XSLT. As far as I'm aware, XML as a standard is already done as well.

XSLT is more related to frontend frameworks like react. Where XML and JSON are ways of representing state, XSLT and react (or similar) are ways of defining how that state is converted to HTML meant for human consumption.

Also, fun fact, XSLT 3 relies on XPath 3.1 which can also handle JSON.

  • Ah, so it can! I've only ever used XSLT with built-in browser support, never even realized the latest would allow JSON to be rendered with XSLT!

Yes but React is not built into the browser, that's kinda my point.

  • XSLT is a browser spec and part of the web platform though, react never went through that process.

    For what its worth, XSLT 3.0 can apparently work with JSON as well if your main concern from a couple comments up is XML vs JSON.