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

Re: value-of or apply-templates

Subject: Re: value-of or apply-templates
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 10 Mar 2004 12:24:47 GMT
apply templates to value of
  <xsl:apply-templates />

  or:

  <xsl:value-of select=".">

  when you get to the node nested at the lowest level and you simply want to get 
  its content?


if you know that you should probably use value-of as it's probably a
fraction quicker, and it _definitely_ produces what you want
(apply-templates will produce whatever the template for text nodes does
which may or may not be the same as value-of.

On the other hand, for document types that I control, whenever I've used
value-of because I "know" I'm at a leaf we've later extended the
document type to deal with something or other and allowed markup there
so then I've had to go back and change to apply-templates.

So, for fixed public things, docbook, xhtml, etc I'd use value-of but
for more fluid things I'd use apply-templates.



-- 
http://www.dcarlisle.demon.co.uk/matthew

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.