xsl-list
[Top] [All Lists]

[xsl] How do I count the number of elements in a key ?

2006-10-05 13:17:07
Hi,

I have an XML document with the following structure:

<inventory>
 <row>
   <hostmame>AA</hostname>
   <serial>A</serial>
 </row>
 <row>
   <hostmame>BB</hostname>
   <serial>B</serial>
 </row>
 <row>
    ...
 </row>
</inventory>

I defined a key such as:
<xsl:key name="systems" match="/inventory/row/serial" use="."/>

How do I count the number of elements in the key "systems" seeing that several row could have the same "serial" value ? The purpose being to compute the number of unique serial values found in the XML document...

Thanks beforehand,
Michael



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>