Hi Anne-Claire,

I need a XSLT style sheet, that counts that nodes, how can bind SAX event
with XSLT???

> -----Original Message-----
> From: Anne-Claire Trommenschlager
> [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 11, 2001 10:49 AM
> To: [EMAIL PROTECTED]
> Subject: RE: node-set as param 
> 
> 
> Hi,
> 
> if you want to count this kind of nodes, maybe you can use 
> SAX events. In
> fact, each time you find <item>, you test if the attribute 
> width = 2 and you
> increment counter.
> 
> hope this help, if you need more help, don't hesitate
> 
> Anne-Claire
> 
> > -----Message d'origine-----
> > De: Dmitri Ilyin [SMTP:[EMAIL PROTECTED]]
> > Date:       mercredi 11 juillet 2001 10:30
> > �:  '[EMAIL PROTECTED]'
> > Objet:      RE: node-set as param 
> > 
> > Hi Dmitri,
> >  
> > thank for answer,
> >  
> > I need to cound the <item> nodes that have width = 2:
> >  
> > <root>
> >    <items>
> >       <item width="2">
> >       <item width="1">
> >       <item width="2">
> >       <item width="3">
> >    </items>
> > </root>
> >  
> > I can make it in for-each but in that case I can not 
> increment counter.
> >  
> > I have no idea how can I do that.
> >  
> > have you any suggestions??
> >  
> > regards
> >  
> > Dmitri
> >       
> > 
> >     -----Original Message-----
> >     From: Voytenko, Dimitry [mailto:[EMAIL PROTECTED]]
> >     Sent: Tuesday, July 10, 2001 8:36 PM
> >     To: '[EMAIL PROTECTED]'
> >     Subject: RE: node-set as param 
> >     
> >     
> >     Hi Dmitri,
> >      
> >     just call 
> >     <xsl:call-template name="template-with-nodeset-param">
> >         <xsl:with-param name="nodeset-param"
> > select="nodeset-expression"/>
> >     </xsl:call-template>
> >      
> >     You'll get node-set in parameter "nodeset-param" in template
> > "template-with-nodeset-param".
> >      
> >     For instance for XML:
> >     <root>
> >         <items>
> >             <item id="1"/>
> > 
> >             <item id="2"/>
> >             <item id="3"/>
> >         </items>
> >     </root>
> >      
> >     in xsl:
> >      
> >     .....
> >     <xsl:template match="/">
> >         <xsl:call-template name="show-items">
> >             <xsl:with-param name="items" select="/root/items"/>
> >         </xsl:call-template>
> >     </xsl:template>
> >     ...
> >     <xsl:template name="show-items">
> >         <xsl:param name="items"/>
> >         <xsl:for-each select="$items/item">
> >             <xsl:value-of select="@id"/>
> >         </xsl:for-each>
> >     </xsl:template>
> >      
> >     Is that what you need?
> >      
> >     Thanks,
> >     Dmitry
> > 
> >             -----Original Message-----
> >             From: Dmitri Ilyin [mailto:[EMAIL PROTECTED]]
> >             Sent: Tuesday, July 10, 2001 08:51
> >             To: Xalan-Dev List (E-mail)
> >             Subject: node-set as param 
> >             
> >             
> >             Hi *,
> >              
> >             how can I select  "node set" and set it as 
> param in temlate
> > call??
> >              
> >             regards
> >              
> >             Dmitri
> > 
> 

Reply via email to