XSL Basics (part 2) (
Page 1 of 9 )
In this concluding article, expand your XSLT vocabulary by exploring conditional
constructs, loops, variables, and numbering, together with examples and illustrations
of how these programming capabilities can substantially simplify your XSLT experience.In the first part of this article, I explained the need and rationale for XSLT,
together with some of the basic concepts. I demonstrated how XSLT uses template
rules to extract data from an XML data source, build a result tree and present
it in a different manner. Finally, I examined two of the basic XSLT constructs,
and
, and illustrated, with examples, how they could be used to print node values
and recursively traverse an XML source tree.
In the concluding part of this article, I will be examining a bunch of other
XSLT constructs, all designed to make your XSLT experience that much more enjoyable.
Some of these constructs are extremely simple and logical; others offer capabilities
typically found only in programming languages. Regardless, they are bound to come
in useful as you slowly move your development activities to XML and XSL.
Not really in the mood? I don't blame you. But look at it this way - at least
you'll have something to hit your boss over the head with at the next performance
review...