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

Re: count of element occurrences

Subject: Re: count of element occurrences
From: Paul Tchistopolskii <paul@xxxxxxx>
Date: Tue, 19 Sep 2000 07:46:02 -0700
sed count occurrences
----- Original Message ----- 
From: Sebastian Rahtz 

> Paul Tchistopolskii writes:
> 
>  > I don't know about elegancy, but I can suggest 
>  > a simple solution based on your test6 ;-)
>  > 
>  > Consider pipe of 3 transformations:
>  > 
>  > Transformation 1. ( Produce flat list of elements ).
> ...
>  > Transformation 2. sort
> ...
>  > Transformation 3. Is 'flat-hierarchy' grouping which 
>  > I wrote for your test6.
> 
> This requires the "node-set" extension, of course?

Ahh ... even worse ;-) In ideal world it also 
requires saxon:evaluate.

The good thing about this pattern is that 
in Ux-alike environment all you need to write 
is only Transformation 1 ( trivial ).

Transformation 2 and Transformation 3 
are universal transformations, like grep, diff, sed 
e t.c. we have in UNIX.

But to have T2 and T3 universal, saxon:evaluate
should be used.

> I got very bogged down in a solution like this but using keys as
> well. I need to have a cup of tea and stare at it again

The advantage is that if using pipes 
you have no need in writing more than Transfromation 1.

The disadvantage is that this is not XSLT mainstream
( emulating a | b with RTF -> node-set is a bit boring 
and not that readable. On another hand it is possible 
to use the pipe pattern blindly, without any mental effort. ;-)

Rgds.Paul.



 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.