-
xslt comparison
Below is an example of comparision. -
ouput as an attribute
We can ouput normal text as <xsl:value-of select="xpath-expression" />. If we want to ouput as attribute, we should use {xpath-expression}. For example -
Template priority
XSLT processor will only ever process one template when you apply templates to a node, so it has to choose one among all matched templates based on the matched priority. <template matching="something" priority="1"> . If there is no explicit priority assigned to a template, it will used default priority. -
matching pattern
The values for match attribute of ≶xsl:template> can be <ul> <li>/ matches the document node</li> <li>* matches any element</li> <li>text() matches text nodes</li> <li>The name of an element matches that element</li> <li>path patterns</li> </ul> -
builtin template
<p>There is a built-in template rule to allow recursive processing to continue in the absence of a successful pattern match by an explicit template rule in the stylesheet. This template rule applies to both element nodes and the root node. The following shows the equivalent of the built-in template rule:</p> <xsl:template match="*|/"> <xsl:apply-templates/>