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

Re: statistice using xsl

Subject: Re: statistice using xsl
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Mon, 18 Dec 2006 09:21:21 +0000
statistice
On 12/18/06, fatma helmy <fatmahelmy2000@xxxxxxxxx> wrote:
suppose i have the following xml file

<books>
<book>
   <author> joe </author>
  <author> mary </author>
</book>
<book>
   <author> joe </author>
  <author> hanz </author>
</book>
</books>

i need to perform the following statistics using xsl

<tag name="joe">
 <path> book/author </path> <frequency> 4 </frequency>
<value  frq="2"  transactions = "1" , "2"> joe </value>
<value frq="1" transactions = "1" > mary </value>
<value frq="1" transactions = "2" > hanz </value>
</tag>

i mean joe has been repeated twice in book 1 and book 2, while hanz has been repeated in book 2 only, i need to extract the order of node book

You can't generate this with XSLT:


transactions = "1" , "2">

as its not well-formed XML (I know its most likely a typo)

Also its not clear from your output what the requirements of the
transform are - for example the outermost <tag>.  I can imagine that
if someone posted a solution you would quickly reply with "yes it
worked with the sample input I showed you but it doesn't work with my
real input...."

cheers
andrew

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.