Adding Programming Logic Isn’t Just for Propheads
In This Chapter
Finding out about conditional and looping structures
Testing for conditions with xsl:if
Deciding among a set of conditions with xsl:choose
Looping through a set of nodes with xsl:for-each
A re you a prophead? (Prophead is short for propeller head or geek.) If you aren’t sure, I’m going to give you a simple test that can tell you exactly whether you qualify. Here goes:
When you read those lines, what was your reaction? Did you have a quizzical look on your face? Did you groan? A nod of the head? Or perhaps you screamed out in excitement and felt your pulse racing?
Well, if you cried out in exultation and felt your heart skipping a beat, my guess is that you’ve got programming in your blood and are as “excited as a prophead” about getting into a discussion on adding programming logic to your XSLT stylesheets.
Kidding aside, no matter your reaction, I think you’ll find this chapter to be extremely useful to expand the scope of what you can do with XSLT.