July 2000
Intermediate to advanced
400 pages
7h 33m
English
The template rules shown so far in this chapter have been named and invoked based on a symbolic name. XSLT also supports invoking template rules based on pattern-matching. An XSLT pattern is a stylized XPath expression that identifies subsets of the source document. An XSLT pattern contains one or more location paths separated by a |. Location paths contained in XSLT patterns can only use the child and attribute axes. That stated, a location path in an XSLT pattern can use also the // operator (but not the equivalent descendant-or-self axis).
Patterns are associated with a template rule using the match attribute instead of the name. attribute.
<xsl:template match='author|illustrator' > <contributor /> </xsl:template> ...
Read now
Unlock full access