xsl-list
[Top] [All Lists]

Re: Count() nodes ??

2003-09-16 10:33:25
Hi Dipesh,
 Please try the following --
count(//FixedNodes//Subnode)

Regards,
Mukul

--- Dipesh Khakhkhar <dkhakhkh(_at_)mailbox(_dot_)syr(_dot_)edu> wrote:
Hi,

I am having the following xml document.

<Root>
 <FixedNodes>
   <Node name="1">
      <Subnode myAtt="itsValue"/>
      <Subnode myAtt="itsValue"/>
      <Subnode myAtt="itsValue"/>
   </Node>
   <Node name="2">
       <Subnode myAtt="itsValue">
       <Subnode myAtt="itsValue">
       <Subnode myAtt="itsValue">
       <Subnode myAtt="itsValue">
    </Node>
 </FixedNodes>
 <VaryingNodes>
     <Node name="3">
       <Subnode myAtt="itsValue">
       <Subnode myAtt="itsValue">
     </Node>
  </VaryingNodes>
</Root>

How do i count number of Subnode within FixedNodes.
I tried using
 "count(//Root/FixedNodes/Node/Subnode)
But i got count as zero. Is this because there is
attribute associated with 
each of the Node element ?

Can someone please tell me how do i count it ?
Thanks in the anticipation that I will get some
reply.

Regards,
Dipesh


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



__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



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