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

Re: Only copy nodes that have text at some point in th

Subject: Re: Only copy nodes that have text at some point in the tree
From: "Thomas B. Passin" <tpassin@xxxxxxxxxxxx>
Date: Fri, 28 Sep 2001 18:17:38 -0400
Re:  Only copy nodes that have text at some point in th
[<mjyoungblut@xxxxxxx>]
>
> This takes care of all of the product nodes, but what about the
> <Grandchild> node for <Product NodeID='C'>?  This should also be removed.
> Is there a recursive way of solving this problem?
>

Doesn't xsl:value-of look for the first text content all the way down the
whole branch?  If so, you could test like this:

<xsl:variable name='is-there-any-text'>
    <xsl:value-of select='.'>
</xsl:variable>

<xsl:if test='$is-there-any-text !=""'>....</xsl:if>

Sorry all those quotes are hard to read, just get them to nest right.

Cheers,

Tom P


 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.