[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSLT Dead?

Subject: Re: XSLT Dead?
From: Steve <subsume@xxxxxxxxx>
Date: Tue, 17 Apr 2007 15:14:34 -0400
Re:  XSLT Dead?
Ahh, give and take. For-each is given nodes and apply-templates takes
nodes it "wants". I think I see.

Andrew, when can I expect my benefits package?

-S

On 4/17/07, G. Ken Holman <gkholman@xxxxxxxxxxxxxxxxxxxx> wrote:
At 2007-04-17 15:02 -0400, Steve 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.

Think "pull" and "push".

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

With for-each one pulls nodes from the source tree and the
instruction supplies the one result tree construction rule used for
all nodes pulled.

With apply-templates one pushes nodes from the source tree at the
stylesheet and the processor finds the template rule with the result
tree construction rule for each individual node pushed.

These characterizations seem to be received well by my students.

I hope this helps.

. . . . . . . . Ken

>-Steve
>
>On 4/17/07, Andrew Welch <andrew.j.welch@xxxxxxxxx> wrote:
>
>>so think XSLT is trivial.  I always ask them to explain the difference
>>between xsl:for-each and xsl:apply-templates...


-- World-wide corporate, govt. & user group XML, XSL and UBL training RSS feeds: publicly-available developer resources and training G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.