RE: TOC Problem
At 09:31 AM 3/3/2005, you wrote:
THE PROBLEM: Ok, i am able to fetch all the beginnings of the speeches per speaker. But if i access a further speech of a speaker , further means all speeches after the first one, the TOC is falsly extended in this way:
That's why this is a grouping problem (which was my hint yesterday, and someone else's, I think).
An essential aspect of grouping is de-duplicating (boy do I wish there were another word for that ... I suppose "removing duplicates" might do), so that each group is processed once. If you do not de-duplicate your list of grouped items, each group is processed as many times as there are members of the group.
That's why you're getting three listings for Joe. If he appeared a fourth time you'd get a fourth listing.
Look again at those resources on grouping and see whether they don't help.
In particular, in XSLT/XPath it's not a matter of "memorizing" whether a name has been encountered already, but rather of selecting not "all names" but rather "all names *the first time they appear*". Having selected all names the first time they appear, you then proceed to process, for each of those names, all their appearances.
That's how they get grouped -- and this is, in fact, the essence of the "Muenchian method" of grouping in XSLT (which you will find to be well-documented).
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format