Chapter 4. Creating Match Patterns

Everything you’ve done in this book so far has been fairly straightforward, except for one thing: match patterns, which have been a little mys-terious. We’ve used various match patterns, such as “/PLANETS” in <xsl: template> elements, without offering a lot of systematic explanation on how these patterns really work, as in this case:

<xsl:template match="/PLANETS"> 
    <HTML> 
        <HEAD> 
            <TITLE> 
                The Planets Table 
            </TITLE> 
        </HEAD> 
        <BODY> 
        . 
        . 
        . 
        </BODY> 
    </HTML> 
</xsl:template> 

This chapter is going to provide all you need to know to create match patterns in XSLT. You use match patterns in the <xsl:template>, <xsl:key> ...

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.