For folks who find beauty in such things, XSLT is a masterpiece.  Like any good work of art, it's open to personal interpretation.

Xslt uses vary widely, but the language itself is inherently a Functional language--in contrast to Markup languages like Xml and Html that describe or tell how to display data, or Scripting languages like javascript with functions being defined explicitly and executed in order or in response, or object-oriented programming languages which establish a framework for things to happen and allow the consumer to dictate what methods are applied to what objects and when.

A functional language gets the name from the mathematical use of 'function' and means that what Xslt does is accept input, processes it, and outputs a result.  Without pains taken to override, the same input to an Xsl Transform file will always result in the same output.  The XSLT itself is simply a huge equation, and the input xml are values for the variables.

Conceptually, I like to think of Xslt as a series of sieves.  Xml is provided to the Xslt, and the Xslt sifts through it, eliminating cruft here and adding bits there until the gem comes shaking out the bottom.  You got a <person> chunk it shakes down to the match="person" template, where it falls through the transformation there; possibly breaking up the <person> and shaking out <name>s, and <age>s, and <gender>s which will jiggle around until they find their template to fall into, until something falls out the end--the same core bits relabled, morphed, adjusted, resorted, eliminated, added-to, and repackaged.

 

Check XHTML « spb.xanderlih.com Copyright © Xander Lih 2000-2012  » Check CSS