Here's a solution with a readable and sorted output of the Requests with a count of each promotion and a list of all the Reffs. Unfortunately I wasn't able to figure out how to group each single Reff, but hopefully this will help you get an overview of the log-file. FYI: You'll have to post the code in a new xslt file after the <!-- start writing XSLT --> tag and include the macro in a template (or directly on a page). Please note that you will have to put in the URL of your XML log-file in the variable on top.
Count equals string values
So i have a xml file
<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 count distinct reff for each promotion
<ApacheLog>
<LOGS>
<promotion1>2</Request>
<numReff>2</RemoteHost>
<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.
Hi enclave,
Here's a solution with a readable and sorted output of the Requests with a count of each promotion and a list of all the Reffs. Unfortunately I wasn't able to figure out how to group each single Reff, but hopefully this will help you get an overview of the log-file. FYI: You'll have to post the code in a new xslt file after the <!-- start writing XSLT --> tag and include the macro in a template (or directly on a page). Please note that you will have to put in the URL of your XML log-file in the variable on top.
Please get back to me if you have any questions.
All the best,
Søren
is working on a reply...