Subject: Re: [xsl] When to use text()|
From: David Carlisle <davidc@xxxxxxxxx>
Date: Sun, 23 Mar 2014 18:01:30 +0000
What on earth is that? "text" in English might mean "a book" or several other meanings. I actually can't think of a programming language that has a "text" type. Xpath has a string type (for which you want string() or more usually the implicit implied string value) and text nodes (which you want text() )
I note you have consistently failed to say what you think the actual definition should have been, or how that definition would have been more intuitive.
$cn/text() returns the sequence of text nodes (" 1 ", " 2 ") (that is the real and imaginary parts of the number.
Your one word non-answer gives no indication of what value you think would have been a more intuitive definition of text() or what $cn/text() should return, (given that element() returns element nodes attribute() returns attribute nodes and comment() returns comment nodes.