Changing the Order in Which the Data Is Read
Go back to Listing 12.2 and change the order of the templates to match Listing 12.4.
Listing 12.4 Reversing the Order of the Templates
1: <xsl:template match="Publisher"> 2: <td><xsl:value-of select="Name"/></td> 3: <td><xsl:value-of select="Address"/></td> 4: <td><xsl:value-of select="Phone"/></td> 5: </xsl:template> 6: 7: 8: <xsl:template match="Author"> 9: <td><xsl:value-of select="Name"/></td> 10: <td><xsl:value-of select="Address"/></td> 11: <td><xsl:value-of select="City"/></td> 12: <td><xsl:value-of select="State"/></td> 13: <td><xsl:value-of select="Email"/></td> 14: </xsl:template> |
Save the file as listing12-4.xsl.
Modify Listing 12.3 to read this file and then view it in a browser. The ...
Get Sams Teach Yourself XML in 24 Hours 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.