[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] match taste


Subject: Re: [xsl] match taste
From: Peter Davis <pdavis152@xxxxxxxxx>
Date: Wed, 20 Nov 2002 00:41:44 -0800

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sorry, you are thinking of a "select" statement, not a template match pattern.  
When you say <xsl:template match="...">, you are NOT saying, "search the 
entire tree for these elements."  You are saying, "use this template for 
elements that match this pattern."  There is a huge difference between 
selecting and matching, and, in the case of matching, there really is NO 
difference between the patterns in question.

On Tuesday 19 November 2002 23:47, Zink, Juergen wrote:
> You cannot compare these two matches.
> The first searches node1 and all node2 in the subtree.
> The second one searches node2 and lookup the parents.
> Of course the second one is faster, but how do you
> position on parent of node2?
>
>
> Maybe you want compare
>   match="//node1//node2"
> with
>   match="//node2[ancestor::node1]"?

- -- 
Peter Davis
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE920rIhDAgUT1yirARAlh4AJ4vRblDfIJCXeiECmpUZ5INRN23gQCfdJlq
vzoe9zw1VIGv+K15L+kxvT4=
=ocB/
-----END PGP SIGNATURE-----


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread