Re: [xsl] "Instantiating a template" ?

Subject: Re: [xsl] "Instantiating a template" ?
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 02 Dec 2003 12:02:46 -0500
At 01:13 AM 12/2/2003, David T wrote:
self::node() in the context of the root element will match the root node.

But the rules for patterns restrict them to using the child:: or attribute:: axes, or the operator "//" (to get the effect of the descendant:: axis).

(Any of the axes can be used in predicates in the expression: the restriction applies to the axis in the path expression, which, you recall, is child:: unless stated otherwise.)

So it might be a bit more precise to say self::node(), in the context of the root, will *select* the root -- but if you try to match with it, you'll get an error.

The difference and complementarity between matching and selecting, templates and apply-templates, is the Yin and Yang of XSLT, and surely close to the heart of its Mysteries.


====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================

XSL-List info and archive:

Current Thread