3 ms·
My personal homepage in the 2000's was a simple XML document, automatically translated with XSLT. IE supported that using <?xml-stylesheet?> pre-processor tag.
by sedatk 3y ago
My personal homepage in the 2000's was a simple XML document, automatically translated with XSLT. IE supported that using <?xml-stylesheet?> pre-processor tag. When you tried to view its source, you'd only see a weird XML markup. Surprised a few I'm sure as this predates Firebug and similar DOM inspectors :)
I actually liked XML + XSLT + XPath combo a lot, and kept using them with my projects at Microsoft.
- MrOxiMoron 3y agoI did the same, and then allowed logged in users to define their own stylesheet. Thought it was pretty cool at the time.
- saurik 3y agoThis is still supported in the like of Chrome/Safari. It just sucks as they never upgraded past XSL/T 1.0.
- vbezhenar 3y agoI wouldn't bet on this support to continue forever. There were calls to drop this support. Thankfully it should be possible to emulate the whole thing with JS snippet, so old websites probably would work with minimal modifications.
- thom 3y agoOne of the first places I worked ended up creating quite a nice framework where components would ask for data that was all put in a single SHAPE query, and the view layer was just XSLT (which is a perfectly nice functional language once you understand it). Was pretty productive.
- actionfromafar 3y agoI tried to go that path in 2010-ish but discovered browser support was not great, so I dropped it. I really liked it.
- palsecam 3y agoI still use, to this day, XSLT on my website: 1/ To transform its Atom feed to pretty-looking HTML, if you access it from a browser: https://paul.fragara.com/feed.xml https://paul.fragara.com/feed.xml 2/ Similarly, to embed the feed dynamically on the homepage, using JavaScript XSLTProcessor (https://developer.mozilla.org/en-US/docs/Web/API/XSLTProcessor https://developer.mozilla.org/en-US/docs/Web/API/XSLTProcess...) This works on all major browsers (and even on IE!) The XSL sheet is here: https://gitlab.com/PaulCapron/paul.fragara.com/-/blob/master/src/atom2html.xsl https://gitlab.com/PaulCapron/paul.fragara.com/-/blob/master... In another context, I’ve leveraged XSLT 2.0, this time in a build process, to slightly transform (X)HTML pages before publishing (canonicalize URLs, embed JS & CSS directly in the page, etc.): https://github.com/PaulCapron/pwa2uwp/blob/master/postprod.xsl https://github.com/PaulCapron/pwa2uwp/blob/master/postprod.x...
- spiralx 3y agoI wrote an XSLT stylesheet that would turn any page into a pretty-printed source view of the HTML just by including it via the <?xml-stylesheet?> tag. That was during the years I worked at a publishing company that stored, generated and edited everything via a combination of XML, XSLT, XPath, XInclude and XQuery, and now I'm working somewhere else that generates documents I do miss the flexibility of that combination... unfortunately it's hard to sell anything XML-related to people who've never seen it used effectively.