Hi,
On 11/22/2011 10:53 AM, Rob wrote:
Wow.
I would have thought that "text()" would return the text, not a sequence of
nodes.
That's really counter intuitive.
There's a lot about XSLT, and XPath too, that's counter-intuitive,
especially if your intuition is informed by the way other languages work.
It could be argued that this keeps you on your toes while you are
learning (unless you aren't paying attention, and stub them), and this
is good since after all, XSLT and XPath are quite different from other
technologies. (Which is also good, since if they weren't, we wouldn't
need them. Their being different is a necessary condition of their being
distinctively useful.)
In XPath, "text()" is actually short for "child::text()". If you know
this, you are perhaps less likely to think it's something it isn't.
All this is detailed in the volume "Secrets of the XSLT Masters"
(unpublished).
Cheers,
Wendell
--
======================================================================
Wendell Piez
mailto:wapiez(_at_)mulberrytech(_dot_)com
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Direct Phone: 301/315-9635
Suite 207 Phone: 301/315-9631
Rockville, MD 20850 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================
--~------------------------------------------------------------------
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>
--~--