- XSLT is crucially dependent on XPath for many functions
- XPath defines patterns for the match attribute of xsl:template:
<xsl:template match="thought/author" >
- XPath defines expressions for the select attribute of xsl:apply-templates:
<xsl:apply-templates select="author" />
- XPath defines expressions for the select attribute of xsl:value-of:
<creator><xsl:value-of select="author" />
- We will see that many template instructions also use XPath
- XPath expressions can yield values of type:
- Node-set (collection of nodes)
- Boolean value
- Number
- String
- Expression evaluation often occurs with respect to a context node
<xsl:template match="author">
..... context node is the author node being processed
<xsl:value-of select="."/> Selects the contents of the context node
<xsl:value-of select="@xyz"/> The xyz attribute of the context node
</xsl:template>