Home
TrafMeter Web Online Help
TrafMeter
What is TrafMeter?
License Agreement
TrafMeter Editions
Registration Info
How To Contact Us
Description
System requirements
Introduction
Installation Package
Installation Guide
Opening the configuration
Selecting NIC
Capturing the traffic
TrafMeter Service Monitor
User authentication
Sending SMS
NAT
Traffic Shaper
Viewing the Traffic Counters
Processing the captured packet
Logging the Application Events
Logging the denied packets
Firewall
Zeroing counters
Users
Filter Manager
Filter Editor
Rule Editor
IP Address Groups
Database Connection String
XML Traffic Reports
Using XSL formatting
The example of XSL formatting
The example of XSL formatting (2)
Traffic Logging into the Database
Database table
Packet Logging
Into the plaintext file
Filename template
Into the database
Database Table
Microsoft SQL Server Syntax
MySQL Server Syntax
Microsoft Access Syntax
Useful SQL scripts
Host Header Logging
Into the plaintext file
Into the database
Database Table
Microsoft SQL Server Syntax
MySQL Server Syntax
Microsoft Access Syntax
Result Codes
Counting VPN packests
Table for storing Filter Names
Registry Settings
FAQ
TrafMeter FAQ
Traffic counting with TrafMeter FAQ
Configuration examples
Example 1
Example 2
Example 3
Example 4
Example 5
Example 6
Example 7
Example 8
Knowledge base
IP protocol number
Type Of Service (ToS) field
MAC address
Promiscuous mode
Ethernet hub
Ethernet switch
Ethernet
NAT router
HOWTO: Creating an OLE DB Connection String for Microsoft SQL Server
HOWTO: Creating an OLE DB Connection String for an Access
HOWTO: Creating an OLE DB Connection String for MySQL
Manual editing of the XML files
Zeroing counters using TrafReset
How to enable
Reloading the Filterset
TrafMeter :: Using XSL formatting for XML Traffic Reports

Using XSL formatting for XML Traffic Reports

XSL stands for Extensible Stylesheet Language. It is kind of the XML equivalent of Cascading Stylesheets (CSS). Since XML data by itself does not contain any information on how to render its contents, a style sheet needs to be attached to it in order to convert it into HTML, PDF, RTF, GIF or any other display format.

Here is an example of XML document produced by TrafMeter:

<?xml version="1.0"?>
<TrafficReport>
	<Filter Id="1">
		<Name>ICMP</Name>
		<Sent>7224</Sent>
		<Recv>7224</Recv>
	</Filter>
	<Filter Id="2">
		<Name>TCP</Name>
		<Sent>3566</Sent>
		<Recv>8967</Recv>
	</Filter>
	<LastModified>November, 26 2002 11:19:14</LastModified>
</TrafficReport>

If you open this document using Microsoft Internet Explorer, it will look like:

This view is not human-friendly. However, let's create XSL formatting (in a separated file traffic.xsl) for the XML document. The content of traffic.xsl is here.

Next, add a reference to the traffic.xsl in a prolog of the XML document:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="traffic.xsl"?>
<TrafficReport>

...and we will get a human-friendly view of the XML document using Microsoft Internet Explorer:

To format the Monthly XML Traffic Reports, use XSL formatting included in the TrafMeter package.

 

This HTML Help has been published using the chm2web software.