Subject: Re: [xsl] Use 'count' or xsl:variable? From: "Joerg Heinicke" <joerg.heinicke@xxxxxx> Date: Mon, 24 Dec 2001 03:36:20 +0100 |
Hello Markus, this is a general grouping problem. Search for 'grouping' and 'key' or 'xsl:key' on the list or look at Jeni's site: http://www.jenitennison.com/xslt/grouping/muenchian.html. Christmas regards to all, Joerg > Hello, > > > > Jeni Tennison wrote: > > > .... For example to > > count how many books there are with a last_name of 'Austen', you would > > use: > > > > count(/library/book[last_name = 'Austen']) > > > > (although if you're doing this a lot you'll be better off with a key) > > > I have a similar (and follow up) problem like Marina, so I use her example: > > > Would there be any way to extract a summary containing the last name > of the authors and the number of books they have written? > > like: > > <executive_summary> > <author last_name="Austen" nr_of_books="41" /> > <author last_name="..." nr_of_books="..." /> > ... > </executive_summary> > > > Whatever I was able to think of displayed multiple results for each > author. > > So my problem is to call: > > count(/library/book[last_name = '$current_author_i_am_dealing_with']) > > only the first time I encounter him. > > > Thanks on any suggestions, > > Markus XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Use 'count' or xsl:variab, Markus Spath | Thread | [xsl] Param value in Big5 encoding, E100 SFYang |
Re: [xsl] Use 'count' or xsl:variab, Markus Spath | Date | [xsl] entities in a .fo file, tony |
Month |