[xsl] Selecting Parent Nodes with Empty Children

Subject: [xsl] Selecting Parent Nodes with Empty Children
From: "Hellstern, Manny" <manny.hellstern@xxxxxxxxxxxxxx>
Date: Fri, 5 Apr 2002 13:33:02 -0600
I have XML that looks like:

<APP>
	<SECTION id="first">	
		<CONTROL type="button">
			<VALUE />
		</CONTROL>
		<CONTROL type="text">
			<VALUE>dummy text</VALUE>
		</CONTROL>
	</SECTION>
	<SECTION id="second">	
		<CONTROL type="button">
			<VALUE />
		</CONTROL>
		<CONTROL type="button">
			<VALUE>more text</VALUE>
		</CONTROL>
	</SECTION>
</APP>

What I want to select is a tree fragment that looks like:

<SECTION id="first>
	<CONTROL type="text">
		<VALUE>dummy text</VALUE>
	</CONTROL>
</SECTION>
<SECTION id="second">	
	<CONTROL type="button">
		<VALUE>more text</VALUE>
	</CONTROL>
</SECTION>

Thanks to all who reply.

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


Current Thread