Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Counting children in MSXML

From: Joao Pedro Martins <jota@------->
To:
Date: 3/2/2000 11:38:00 AM
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&ccedil;&atilde;o Interactiva @ LINK


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


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent