Currently I have this code which calls the "user" template for each user node.
<xsl:for-each select="./user|./UnformatedUser">
<xsl:apply-templates select=".">
<xsl:with-param name="span"/>
</xsl:apply-templates>
</xsl:for-each>
However, I now want to use a template named "fulluser" for all users. I've tried adding name="fulluser"
to the <xsl:apply-templates>
tag but it didn't work.
The <xsl:apply-templates>
instruction doesn't use a template name to select a template for execution on a particular node. It only uses the match pattern of templates when deciding which template to select.
To select for execution a template by name, use the <xsl:call-template>
instruction.
why not use xsl:call-template ?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With