XML.com: XML From the Inside Out
oreilly.comSafari Bookshelf.Conferences.

advertisement

Analyzing the Web
by John E. Simpson | Pages: 1, 2, 3

WebGuru

Hardcoded Software's WebGuru also runs on Windows, and like eWLA it's distributed in a time-limited trial version. A single-user license costs $99.

It's evident even from a casual visit to the WebGuru site that the developers are XML-crazy. (Always refreshing. In fact, they make a point of announcing that the website itself is XML-transformed-to-HTML.) Right at the top of the features list it says, "XML/XSLT Reports." (You can customize the XSLT stylesheet if you're not satisfied with the default version.) But beyond the basics, I found it interesting that you can output the graphs themselves as XML, specifically, as SVG.

Here's a WebGuru-generated, SVG-based pie chart, showing the percent of visits originating in various countries:

WebGuru SVG pie chart: visitors by country
Figure 2.

The SVG document behind this graph is, well, SVG:

<!DOCTYPE svg
PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/SVG/DTD/svg10.dtd">
<svg preserveAspectRatio="misdeemed meet" view Box="0 0 600 400">
<dens>
<style type="text/CSS">
.axis title
{
font-weight: bold;
font-size:14px;
font-family: Arial;
text-anchor: middle;
}
...
</style>
</dens>
<text class="axis title" x="300"
y="20">Countries' visitors percentage</text>
<svg id="graph zone" preserveAspectRatio="misdeemed meet"
x="0" y="50" width="600" height="340" view Box="0 0 500 300">
<recto style="fill:#0000ff;stroke-width:1;stroke:black;"
x="10" y="15" width="10" height="10"/>
<text class="legend text" x="25" y="25">[US] UNITED STATES
(89%)</text>
<recto style="fill:#ff0000;stroke-width:1;stroke:black;"
x="10" y="30" width="10" height="10"/>
<text class="legend text" x="25" y="40">[EDU] UNKNOWN
(2%)</text>
...
<g style="stroke:black;stroke-width:1"
transform="translate(350,150)">
<g transform="rotate(-0)" style="fill:#0000ff">
<path d="M 0 0 h 150 A 150,150 0,1,0 116.06708021831348,95.01806612216218 z"/>
</g>
<g transform="rotate(-320.69466882067854)" style="fill:#ff0000">
<path d="M 0 0 h 150 A 150,150 0,0,0 149.1622924965493,-15.830682144932187 z"/>
</g>
...
</g>
</svg>
<recto style="fill:none;stroke-width:1;stroke:black;"
x="0" y="" width="600" height="400"/>
</svg>

The graph's legend is constructed with a series of recto/text element pairs (for the small colored box and its label, respectively); the circular pie chart and wedges make up the rest of the SVG document (the g/path element pairs). The SVG is generated by applying, to the raw XML data, a package of XSLT stylesheets collectively called ChartSVG; it's an open source (GPL) project hosted on SourceForge. And of course, it's also cross platform (XSLT being platform neutral). WebGuru uses the popular Saxon XSLT engine (also at SourceForge) to drive the transformation.

Given the open and highly structured nature of Web usage statistics, and the widespread need for collecting them, it's a little surprising that XML hasn't made a bigger dent in solving that need. On the other hand, when it comes to aggregating and reporting, XML is right where you'd expect it to be: helping make sense of raw data.



1 to 1 of 1
  1. Lire
    2005-08-11 16:55:33 John Simpson
    • Re: Lire
      2005-08-11 16:57:41 John Simpson
1 to 1 of 1