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

Re: building a mental model for the "current node" be

Subject: Re: building a mental model for the "current node" behavior
From: "G. Ken Holman g.ken.holman@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 6 Nov 2020 02:24:10 -0000
Re:  building a mental model for the "current node"  be
Thank you, Christophe, for still having that
diagram available readily as a web page!

Back in 2014 I released my PDF books (on which I
had based my training) for free, including the
one on XSLT/XPath and the one on XSL-FO. They are
available both in US-letter and A4 page sizes here:

http://www.cranesoftwrights.com/training/index.htm

Page 72 of the XSLT/XPath book has a version of
that diagram that appears to be more current than what Christophe has.

I hope members of the list find these books useful!

. . . . . . . Ken

At 2020-11-05 19:52 +0000, Christophe Marchand cmarchand@xxxxxxxxxx wrote:
Content-Transfer-Encoding: 8bit

You mean that one :
https://our.umbraco.com/documentation/reference/templating/macros/xslt/xpath
-axes-and-their-shortcuts
?

Christophe

Le 05/11/2020 ` 17:50, Dave Pawson dave.pawson@xxxxxxxxx a icrit :
On Thu, 5 Nov 2020 at 14:46, Martin Honnen martin.honnen@xxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
Am 05.11.2020 um 15:11 schrieb Chris Papademetrious
As a novice, I get confused remembering when the current node
does/doesnt change. Theres also this, which Im trying to grasp:

https://www.w3.org/TR/xslt-30/#func-current

Whats a good mental model for remembering this?

2. Inside an <xsl:template> block, is there a function that returns the
current **template-matched** node?
That is what the
    current()
function does, I am currently not sure why you first cite it and then
seem to ask for another function doing the job of the current() function.
I think:
   This relates to understanding the mental model?

My view:
   'here' (.) is the current node / position in the input document tree
that is being processed.

View the 'tree' in your head, and you may see the parents, siblings,
children of this node (point in the document tree).
Ken Holman has (had?) a good picture of this which may help.
   Then decide what you want to do next?
   When you have this model in your head comfortably, you may be happy
using
xsl:apply-templates to process the children of the current-node, using
the xsl 'model'.


HTH


--
Contact info, blog, articles, etc. http://www.CraneSoftwrights.com/s/ |
Check our site for free XML, XSLT, XSL-FO and UBL developer resources |
Streaming hands-on XSLT/XPath 2 training class @ US$45 (5 hours free) |
Essays (UBL, XML, etc.) http://www.linkedin.com/today/author/gkholman |

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.