This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Counting children in MSXML


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@link.pt---------------------------------'
                  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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]