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

RE: Apply-templates - how to omit top level element ta

Subject: RE: Apply-templates - how to omit top level element tags?
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Thu, 08 Sep 2005 15:04:39 -0400
RE:  Apply-templates - how to omit top level element ta
Mike,

At 02:45 PM 9/8/2005, you wrote:
>> Part of your problem is that you are using xsl:value-of rather than
xsl:copy-of, value-of always

As I understand it, copy-of does a literal copy, and does not apply any
templates, right?

That's correct: copy-of copies a node and all its attributes and descendants, unchanged, to the result tree in that position.


value-of copies the string value of a node to the result. The string value of a text node is the text in the node; the string value of an element node is the concatenation of all its text node descendants. So the value of

<p>Hey this is <sarcasm>fun</sarcasm>!</p>

is "Hey this is fun!"

(losing the <sarcasm>.)

If more than one node is selected by value-of, only the string value of the first of the nodes (in document order) is copied to the result.

Cheers,
Wendell


====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx 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 ======================================================================

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.