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

Re: why not match text()? (fork from "Novice Question

Subject: Re: why not match text()? (fork from "Novice Question - matching entire text children")
From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: Tue, 21 Dec 2010 09:48:09 +0000
Re:  why not match text()? (fork from "Novice Question
On 20 December 2010 23:17, David Carlisle <davidc@xxxxxxxxx> wrote:
> On 20/12/2010 23:05, Syd Bauman wrote:
>>
>> b) those experts who spoke of the rare need for matching text()
>>    either don't deal with data like mine -- TEI
>
>
> It's not a matter if what experts may do, so much as a question of what
they
> see others doing on this list (and especially) on the xquery list.
> All the uses you gave consisted of doing string manipulations within text
> content, for that text() can be very reasonable (although you still need to
> be careful about comments) but that isn't the common use you see, which is
>
> using
>
> <xsl:value-of select="element-name/text()"/>
>
> rather than
>
> <xsl:value-of select="element-name"/>
>
> especially in a thread with "novice question" in the subject line, it's a
> reasonable asumption that whatever the answer is, it doesn't need text().
>
> Now you don't count as a novice and probably the originator of the original
> thread isn't either, but still, that's what it says in the subject line....


This might be a common problem from people coming from XQuery... in
XSLT we get the string value of the element or attribute, in XQuery
you get the deep-copy, so there is the habit of specifying string()
everywhere (or text() in the past)



--
Andrew Welch
http://andrewjwelch.com

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.