3 ms·
XML is not meant to be a programming language representation. It's meant to be a predictable, simple set of grammatical rules for representing data that may be
by spdustin 11y ago
XML is not meant to be a programming language representation. It's meant to be a predictable, simple set of grammatical rules for representing data that may be hierarchical/shaped/tree-like. XSLT is meant to provide a library of templates used to transform XML to something else (usually XML again, but can be nearly any output format) in a declarative way.
XSL is a little bit like CSS in one way: CSS has selectors, and XSL does too. CSS also has rules (one or more selectors and the properties listed for them) that apply to an output device's representation of the nodes matching those selectors (e.g. a browser's visual styling), and XSL has templates that change the structure of the nodes that match the XSL template's selector. Each template has a context, can transform the input "tree" to any intermediate representation necessary, can apply itself recursively, and can completely transform the XML-structured input into practically any output required.
It's also a religion along the same lines as vim/emacs/atom or Mac/PC/Linux/UNIX/BSD/etc., and thus, discussions decrying the blasphemy of declarative transformations will result in fervent cries of, "XSL sucks, nuke it from orbit," as well as equally impassioned speeches that, "XSL kicks ass, get enlightened!"