[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: Wendell Piez <wapiez@xxxxxxxxxxxxxxx>
Date: Fri, 21 Mar 2014 14:04:33 -0400
Re:  When to use text()
Hi,

On Fri, Mar 21, 2014 at 1:40 PM, Graydon <graydon@xxxxxxxxx> wrote:
> (In this particular case; whitespace text nodes and comments and
> processing instructions can throw a lot more than that off if you
> suppose they're never there.)

Exactly. I think the problem is deeper than the name of text(). They
could have named it text-node(), which might have exposed the issue
better, but it wouldn't have solved it. (Instead of the beginners
jumping to incorrect conclusions, they'd go "huh?", and then jump to
incorrect conclusions.) The deeper problem is the much more common
one, that we don't like being surprised when things are different and
more complicated than we imagined going in. Why do we have comments,
PIs, or mixed content at all? They are such a pain. (Because it's a
*markup language*, Sweetie.)

Then, I suppose, it's nice to have someone else to blame. James Clark
and Steven J. DeRose! If only the XPath 1.0 Rec had correctly
anticipated what I am thinking today, this entire problem could have
been avoided!

Or, there's an alternative approach. Heiko, who started this thread,
demonstrated it. Stay alert, don't assume all your guesses must be
correct, and ask questions.

Cheers, Wendell

-- 
Wendell Piez | http://www.wendellpiez.com
XML | XSLT | electronic publishing
Eat Your Vegetables
_____oo_________o_o___ooooo____ooooooo_^

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.