![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: xpath ancestors [Thread Next] Re: xpath ancestorsTo: NULL Date: 1/10/2008 4:23:00 PM On Thu, 10 Jan 2008 17:58:59 +0100, Martin Honnen <mahotrash@y...> wrote: >Chuck Jungmann wrote: > >> <xsl:template match="node()" mode="nameNode"> > >Note that node() does _not_ match the root node so you need > <xsl:template match="/ | node()" mode="nameNode"> >here. > >> <xsl:template match="node()" mode="makePath"> > >Same here > <xsl:template match="/ | node()" mode="makePath"> > >Otherwise the default template would kick in which processes the child >nodes of the root node and that way you don't get the results you are >looking for and even recursion in the latter case. Thank you for the response. Actually, I had been trying to use XSL to identify the returned nodes, but then I realized that, for the purposes of understanding what was happening, I could use the DOM in Javascript and examine the results in a debugger. I was just going to respond to myself to say what I had learned (ie that "ancestor-or-self::node() returned the document node and that using "ancestor-or-self::*" didn't) when I read your response. | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
