[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Creating statistics for a given XML instance

Subject: Creating statistics for a given XML instance
From: "Wegmann, Frank" <Frank.Wegmann@xxxxxxxxxxxxxx>
Date: Fri, 22 Sep 2000 12:20:03 +0200
xml statistics
I wonder if it is possible with XSL to create a statistics for
a given XML file that tells which element has been used how often
along with the usage of every attribute.

Given a XML sample file like this:

<elem1 att1="val1">
 <elem2 att1="val2" att2="val10">
  <elem3 att3="val"/>
  <elem3 att2="val"/>
  <elem4>
    <elem5 att1="val3" att4="val20"/>
    <elem5 att1="val2" att2="val2" att4="val21"/>
  </elem4>
 </elem2>
</elem1>

I want to end in a table that reports the number of uses of these elements
and attributes:

	Total	att1 att2 att3 att4 att
elem1	  1     1    0    0    0   0
elem2   1     1    1    0    0   0
elem3   2     0    1    1    0   0
elem4   1     0    0    0    0   0
elem5   2     2    1    0    2   0

As far as I could search the archive, I haven't yet seen a solution for
that kind of problem. Or did I miss something?

Frank

--
<Frank.Wegmann at softwareag.com>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.