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]

Simple count question


 
I have a XMl dump as follows:
 
<root>
    <pc>
        <software type="browser">
            <name>Netscape</name>
        </software>
        <software name="word">
        </software>
        <software name="spreadsheet">
        </software>
    </pc>
</root>
 
Question: For each PC, Give a count of software without any child element for the "software" node ? In the above example, the answer should be 2.
 
I tried this but didnt work:
 
<xsl:for-each select="/root/pc">
    <xsl:value-of select="count(software/descendent::*[ name() != ' ' ])">
</xsl:for-each>
 
 
Thanks
 
Pady

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