Interpreter
- Dependency injection in XSLT...or actually maybe not
8 May 2024
Dependency injection in XSLT…or actually maybe not
Ever written two, three or more stylesheets that are almost the same, but not quite the same, maybe you’ve struggled with #import or #include to separate your core shared code from the bespoke specific code? Maybe you’re an OO programmer steeped in the theology of objects, favouring composition over inheritance and find XSLT innate mechanisms to close to its OO cousins? Or a functional programmer at ease with higher order functions, but dabbling in some XSLT and wondering how to apply you functional skills, well read on, hopefully this blog will help you apply these skills in XSLT but ironically question whether these techniques really are the “state of the art”, many believe and when you return to your Scala/C#/Java/C++ or whatever it is you do most of the time, question whether there is more than one way to skin the cat (ew…I hate that phrase).