xsl-list
[Top] [All Lists]

Re: [xsl] XSLT Dead?

2007-04-17 12:23:28
On 4/17/07, Steve <subsume(_at_)gmail(_dot_)com> wrote:
This one has me kind of stumped. Maybe I'm one of these people. What
is the difference between for-each and apply-templates? I have a hard
time even mentally comparing the two.

One function iterates through a node set and the other matches up a
template with a node based on a given context or passed mode. Is that
the right answer, or close to it?


This is only what it seems on the surface -- going in depth reveals a
lot more fundamental differences and what actually are the benefits of
using xsl:pply-templates.

These benefits are actually the benefits of fully undrstanding and
using the features of the XSLT Processing Model.

For a more complete explantion do havelook here:

   http://www.stylusstudio.com/xsllist/200411/post60540.html

and on the other messages in that thread.


"xsl:apply-templates is much richer and deeper than xsl:for-each, even
simply because we don't know what code will be applied on the nodes of
the selection -- in the general case this code will be different for
different nodes of the node-list. Also, the code that will be applied
can be written way after the xsl:apply templates was written and by
people that do not know the original author."



--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play

--~------------------------------------------------------------------
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>