Re: [xsl] xsl:sequence

Subject: Re: [xsl] xsl:sequence
From: Florent Georges <darkman_spam@xxxxxxxx>
Date: Tue, 8 Aug 2006 15:36:50 +0200 (CEST)
Florent Georges wrote:

> David Carlisle wrote:

> > No, it's a single text node generated by the value-of,
> > that text node then gets used to generate the content of
> > the element (and further merging, or separators might
> > happen at that point) but first the text node is generated
> > using 5.7.2.

>   Mmh, we are still speaking about:

>     <foo>one<!-- hmm -->two</foo>
>     <xsl:value-of select="foo"/>

> right?  So the element is not created, it is used.  More
> precisely its string value is used.  And its string value is
> the concatenation of all its descendant text nodes, so
> "onetwo".

>   But I'm feeling we don't speak about the same thing?

  Mmh, I think I didn't understand totaly right your response before
posting.  It seems we are speaking about the same thing.

  Of course, there are cases in atomization then cast to string where
the string value is not used, and really a cast from an atomic type to
a string is used.

  But the mechanism is the same (we go through the typed value instead
of the string value): the sequence contains no text node, but element
nodes, it is atomized, then "Every value in the atomized sequence is
cast to a string" [XSLT2 '5.7.2/4].  *Then* occurs the concatenation
with a separator.

  Adjacent text nodes are merged in the input sequence of the value-of
(in this case there is no text node).  The produced text node may be
merged with adjacent text nodes when it is attached to a tree (so after
being created).  But the result of the instruction above is not related
to text nodes merging.

  Did I miss something?

  Regards,

--drkm






















	

	
		
___________________________________________________________________________ 
Dicouvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet ! 
Yahoo! Questions/Riponses pour partager vos connaissances, vos opinions et vos expiriences. 
http://fr.answers.yahoo.com 

Current Thread