xsl-list
[Top] [All Lists]

Re: [xsl] statistice using xsl

2006-12-18 02:22:35
On 12/18/06, fatma helmy <fatmahelmy2000(_at_)yahoo(_dot_)com> 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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>