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

Re: xsl:value-of select : how to make some tags printe

Subject: Re: xsl:value-of select : how to make some tags printed and othersnot
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 7 Oct 2003 13:13:05 +0100
printe antenna
> Is it possible to make an xsl statement that would print the content of
> the <text> tag and all sub tags 

Note that XSLT doesn't deal with tags it can not access the tags in the
input or directly generate tags in the output.

 (<xsl:value of select="text"/>)

value-of gives the string value of its argument you don't want the
string you want the node itself so that would be

 (<xsl:copy-of select="text"/>)

except that you don't want a copy at all, you need to change somthing,
so use the indentity transformation  (posted to this list most weeks,
also in the faq and explictly in the xslt spec)


then you want 
<xsl:apply-templates/>
together with a template for sw that does not copy the element node

<xsl:template match="sw">
  <xsl:value-of select="."/>
</xsl:template>

David



________________________________________________________________________
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.