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

Re: [xsl] parsing a complex xml tree into simple trees (a challenging problem at least for me :)


Subject: Re: [xsl] parsing a complex xml tree into simple trees (a challenging problem at least for me :)
From: drkm <darkman_spam@xxxxxxxx>
Date: Wed, 9 Nov 2005 22:21:00 +0100 (CET)

David Carlisle wrote:

>  <xsl:param name="a" select=".//text()[contains(.,',')][1]"/>
> would be better as
>                              descendant::text()[contains(.,',')][1]

> which does what I intended (select the first node with a comma)
> although actually i think it doesn't make any difference here
> as $a is always used where XSLT1's implied first-node semantics
> will mean that the extra nodes that are selected when // is used
> don't do any harm.

  Mmh.  I don't understand what's the difference between the two
expressions.  You say that in the first one, the result is a node-set
which count() may be greater than 1, with the test "[1]".  Could you
please explain a bit further?

  Thanks,

--drkm



















	

	
		
___________________________________________________________________________ 
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Tilichargez cette version sur http://fr.messenger.yahoo.com


Current Thread