Hi,
I was having issues manipulating text nodes. I found a way around my issue, but I'm still thinking that my 1st syntax to get the first text node of a sequence should have worked.
My question is given all the example below, is #2 returning the expected value? I was expecting it would work like the syntax for elements in #3 and return the same result as #4 and #5
let $node := <p><b>allo!</b> Il pleut des clous.</p>
let $node2 := <ul><li>1</li><li>2</li></ul>
let $text-node := $node//text()
return
<ul>
<li>{$text-node}</li>
<li>{$node//text()[1]}</li>
<li>{$node2//li[1]}</li>
<li>{($node//text())[1]}</li>
<li>{$text-node[1]}</li>
<li>{$node//text()[1][1]}</li>
<li>{for $i in $node//text() return <span>{$i}</span>}</li>
<li>{for $i in $text-node return <span>{$i}</span>}</li>
</ul>
<ul>
<li>allo! Il pleut des clous.</li>
<li>allo! Il pleut des clous.</li>
<li>
<li>1</li>
</li>
<li>allo!</li>
<li>allo!</li>
<li>allo! Il pleut des clous.</li>
<li>
<span>allo!</span>
<span> Il pleut des clous.</span>
</li>
<li>
<span>allo!</span>
<span> Il pleut des clous.</span>
</li>
</ul>