I learned about XSLT from Wikipedia and W3C. As I understanad XSLT, it
transforms an XML file based upon XSLT's rules.
Can't javascript access the XML, and make changes? What's the reason
for using XSLT over writing up a javascript?
If you're working in an application that only works with Javascript
enabled, then there aren't many advantages. But there are good
reasons for making applications that are accessible to as wide an
audience as possible. If you want to do that, then the application
should still function if the user does not have JS enabled. This
means that the application should present its data in a useful manner
to users without JS. If that involves transforming XML data, then
there is a strong argument for doing so server-side. You can do this
in various ways, including with server-side JS. But the tool designed
specifically for this job is XSLT.
XSLT involves a very different mind-set than JS and will take some
unlearning of imperative techniques (imagine not being able to change
the value of a variable!) but it is a very useful skill.
One hybrid approach I've used on some projects involving XML data
sources is to build an application that works without JS by using XSLT
transforms on the server, but then uses JS when it's available to
enhance the page in ways that bypass those transforms and use the XML
directly or via other transforms to JSON formats. This works
reasonably well, but is a little tedious as you need to maintain both
the XSLT transforms and the JS ones.