Counting children in MSXML

Subject: Counting children in MSXML
From: Joao Pedro Martins <jota@xxxxxxx>
Date: Thu, 02 Mar 2000 11:37:43 +0000
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