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

Re: testing child elements for text

Subject: Re: testing child elements for text
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Tue, 18 Jun 2002 23:31:35 +0200
xsl is element has childs
CROFT, MICHAEL wrote:
I need to see if an element has children that contain data....

	<InsClaimsAdverseClaimantContact Id="1-16J9D">
					<ListOfAmicaContactServiceProvider/>
					<ListOfInsClaimsAdverseClaimant/>
	</InsClaimsAdverseClaimantContact>

What is a way to test if the parent element has any children that actually
have data?  I will only process the parent if it has children that contain
data.

What does "having data" mean? No content (text, elements, whitespace, XML comments): test="not(*[node()])" No text, whether directly or in any descendant nodes test="not(*[string()])" No non-whitespace text, whether directly or in any descendant nodes test="not(*[normalize-space()])" No element nor text, but XML comments allowed test="not(*[text()|*])" No element nor non-whitespace text test="not(*[text()[normalize-space()]|*])" There are a few combinations more, check the list archive (this has just been discussed today)

J.Pietschmann


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.