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

Counting children in MSXML

Subject: Counting children in MSXML
From: Joao Pedro Martins <jota@xxxxxxx>
Date: Thu, 02 Mar 2000 11:37:43 +0000
msxml children
Hello,

I am using MS's XML/XSL engine, and I need to test
the existence of children elements of a element being
matched in a template, as follows:

the xml is something like:

<SECTION>
	<ELEMENT>1</ELEMENT>
	<ELEMENT>2</ELEMENT>
	<ELEMENT>3</ELEMENT>
	<ELEMENT>4</ELEMENT>
	...
</SECTION>

The <ELEMENT>'s are optional.

As to the xml:

...
<xsl:template match="SECTION">
	<xsl:if test="there are element's in this section">
	...
	</xsl:if>
</xsl:template>


I suppose this test could also be made in the apply templates line:

<xsl:apply-templates order-by="@ORD" data-type="number" select="SECTION[where children ELEMENTs count> 0]" />


Can anyone give me hint?



Thanks in advance, j -- ,--------------------------------------------------------------------------. | In [Cyber]Space nobody can hear you Scream | | ... in East Timor, that's about all you can hear... | | *** The Indonesian army is killing innocent people in East Timor *** | | [ The above sig was here for over five years. It seems to be over now. ] | `-----------------------------jota@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' http://www.terravista.pt/BaiaGatas/3612 http://planeta.clix.pt/neves/ Design & Comunicação Interactiva @ LINK


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.