xsl-list
[Top] [All Lists]

Re: "Instantiating a template" ?

2003-12-02 10:02:46
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.

Regards,
Wendell


======================================================================
Wendell Piez                            
mailto:wapiez(_at_)mulberrytech(_dot_)com
Mulberry Technologies, Inc.                http://www.mulberrytech.com
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:  http://www.mulberrytech.com/xsl/xsl-list



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