3 ms·
You fetch XML, JSON, or structured plaintext documents from the content folder, use XPath (XML or JSON) or use string processing (plaintext) to retrieve the app
by moistly 4y ago
You fetch XML, JSON, or structured plaintext documents from the content folder, use XPath (XML or JSON) or use string processing (plaintext) to retrieve the appropriate fields, and transform the data to HTML. Short of writing your application for you, I don’t see how you expect an answer other than “it can be done.” You need to learn how to use the toolset, as with any other language.
- TedDoesntTalk 4y agoOne key point is that the XML do not need to be stored as files on the server. They can be generated at request time by turning database queries into XML responses using your favorite server-side language. The XSLT can be hosted as static files on the webserver.
- moistly 4y agoI’ve personally used AsciidoctorJS + SaxonJS to render pages. I keep intending to see what I can do with the HN API and XPath/XSLT.
- TedDoesntTalk 4y agoWhy would you bother doing that in 2022? It doesn’t really seem relevant anymore.
- moistly 4y agoWhy on earth wouldn’t I? I wanted to experiment, learn a few things, have a bit of fun. Not everything needs to be super serious.
- TedDoesntTalk 4y agoI did not realize you’re doing it for experimentation. I thought some kind of live product.