Internet Explorer and Dynamic Styles

To indicate how much control you can exercise over XSLT transformations using the MSXML processor, I’ll let the user dynamically sort the Planets table in this example. You can see the general idea in Figure 10.3. All the user has to do is to click a button to resort the table by name, mass, radius, or day.

Figure 10.3. Supporting dynamic XSLT transformations.

To sort the table, I use a stylesheet that puts the <xsl:sort> element to work, as you’d expect. Here’s how I perform the default sort, by planet name:

Listing 10.2. Applying Dynamic XSLT Transformations
 <?xml version="1.0" encoding="iso-8859-1" ?> ...

Get Inside XSLT now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.