[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: Ihe Onwuka <ihe.onwuka@xxxxxxxxx>
Date: Fri, 21 Mar 2014 17:44:26 +0000
Re:  When to use text()
On Fri, Mar 21, 2014 at 5:40 PM, Graydon <graydon@xxxxxxxxx> wrote:
> On Fri, Mar 21, 2014 at 05:19:32PM +0000, Ihe Onwuka scripsit:
>> The quirkiness of the definition derives not from the definition
>> itself, because there may well be justification for the existence of a
>> node type that encompasses text with embedded comments. Thats OK.
>
> There isn't, though.  text nodes have no name and a string and no node
> children.
>
> Text nodes are guaranteed leaves, like everything else except for
> element nodes and document nodes.
>
>> The quirkiness derives from giving it an innocuous intuit inducing
>> moniker like text() that leads the consumer astray.
>>
>> Let me parallel. If you call a concept Nothing and then occasionally
>> allow it to contain Something, RTFTM is not appropriate because the
>> fault lies in labelling that concept Nothing.
>
> But it doesn't.  The parent element does.  The issue is not that there
> might be a comment node in the text node, but that there might be a
> comment node child of the parent element node that separates the string
> contents of the element into two or more text node children.
>

If it's a guaranteed leaf you shouldn't get the contents of anything
else when you ask for it.

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.