[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: When to use text()

Subject: Re: When to use text()
From: David Carlisle <davidc@xxxxxxxxx>
Date: Sun, 23 Mar 2014 18:01:30 +0000
Re:  When to use text()
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.