Count equals string

Here should go questions about transforming XML with XSLT and FOP.
enclaved
Posts: 1
Joined: Thu Nov 11, 2010 9:40 am

Count equals string

Post by enclaved » Thu Nov 11, 2010 9:56 am

So i have a xml file

Code: Select all


<ApacheLog>
<LOGS>
<Request>GET promotion2.html HTTP/1.0</Request>
<Reff>www.yahoo.com</Reff>
</LOGS>
<LOGS>
<Request>GET promotion1.html HTTP/1.0</Request>
<Reff>www.yahoo.com</Reff>
</LOGS>
<LOGS>
<Request>GET promotion1.html HTTP/1.0</Request>
<Reff>www.google.com</Reff>
</LOGS>
</ApacheLog>
I need to count how many times each promotion is visited , and caunt diffrent reff for each promotion

Code: Select all


<ApacheLog>
<LOGS>
<promotion1>2</Request>
<numReff>2</RemoteHost>
</LOGS>
<LOGS>
<promotion2>1</Request>
<numReff>1</RemoteHost>
</LOGS>
</ApacheLog>
Can someone help me with this transformation.
Sorry for bad English but is not my native language.