html

Building a Website and Displaying XML docs Transformed with XSLT  #angularjs #reactjs

  • You’ve got three choices: you can do the transformation from XML to HTML at publication time, at request time on the server, or at request time on the client (i.e. in the browser).
  • I am familiar with HTML, CSS, and Javascript, but I have rarely worked with XML or XSLT (this project being a first).
  • Stack Overflow works best with JavaScript enabled
  • We have approximately 300 XML files for which I’ve written an XSLT file, and we would like to display these poems online.
  • My own choice would be to do it in the browser using Saxon-JS (which is an XSLT 3.0 processor running in the browser written in Javascript), but that’s a biassed recommendation as it’s very new technology — which means it’s a question of whether you want to have fun using something bleeding-edge, or not.

This is rather a broad question, but, basically, I am looking for perspective as I am moving forward with a project I am working on. I am building a website (a poetry archive) for a research team. We have approximately 300 XML files for which I’ve written an XSLT file, and we would like to display these poems online. I am familiar with HTML, CSS, and Javascript, but I have rarely worked with XML or XSLT (this project being a first).

@ng_real_ninja: Building a Website and Displaying XML docs Transformed with XSLT #angularjs #reactjs

This is rather a broad question, but, basically, I am looking for perspective as I am moving forward with a project I am working on. I am building a website (a poetry archive) for a research team. We have approximately 300 XML files for which I’ve written an XSLT file, and we would like to display these poems online. I am familiar with HTML, CSS, and Javascript, but I have rarely worked with XML or XSLT (this project being a first).

How should I proceed? I would like to call up the transformed XML contents in a panel to the right of a side navigation bar and below a banner. Should I make a transformation every time a poem is accessed? Or should I create HTML files from the XML and call up those HTML files within another HTML file? If I wanted to display information encoded in the XML outside inner HTML panel, how would I do so?

Basically, I need some direction here. How would you approach this? Any help you could offer would be greatly appreciated. Thank you.

SO isn’t an ideal forum for design questions: someone will probably attempt to close it as “too broad” or “a matter of opinion”. There’s some justification for this: no reputable consultant would make a recommendation without first spending a couple of hours examining the project requirements and constraints.

You’ve got three choices: you can do the transformation from XML to HTML at publication time, at request time on the server, or at request time on the client (i.e. in the browser).

Doing it at publication time gives you minimum operational hassle, but makes it difficult to create a very interactive experience: you’re basically creating a static site (which might be fine for your particular project).

Doing it server-side at request time means you’ve got some kind of server-side framework running, which will inevitably need some operational configuration and maintenance.

Doing it in the browser exposes you to differences between browsers. My own choice would be to do it in the browser using Saxon-JS (which is an XSLT 3.0 processor running in the browser written in Javascript), but that’s a biassed recommendation as it’s very new technology — which means it’s a question of whether you want to have fun using something bleeding-edge, or not.

html