xsl-list
[Top] [All Lists]

Re: [xsl] When to use text()

2014-03-23 13:01:43
On 23/03/2014 17:52, Ihe Onwuka wrote:
text.


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.

In (a real, valid MathML) example

<cn> 1 <sep/> 2 </cn>

There are three child nodes of cn, two text and one element.

$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.

David



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>