xsl-list
[Top] [All Lists]

Re: [xsl] value-of or apply-templates: What is "best"?

2007-05-30 20:52:39
I think below examples are self explanatory.

xsl:apply-templates: defines a set of nodes to be processed, and causes the system to process them by selecting an appropriate template
Example: <para>xxxxx<b>bold text</b>xxxx</para>
<xsl:template match="para">
<p><xsl:apply templates/></p>
</xsl:templates>
Result: <p>xxxxx<b>bold text</b>xxxx</p>

xsl:value-of: writes the string value of an expression to the result tree.
<xsl:template match="para">
<p><xsl:value-of select="."></p>
</xsl:templates>
Result: <p>xxxxxbold textxxxx</p>


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>