Re: [xsl] Finding and processing index terms

Subject: Re: [xsl] Finding and processing index terms
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 15 Feb 2006 12:00:47 -0500
Dan,

At 11:16 AM 2/15/2006, Jirka wrote:
My difficulty is occurring in trying to get the embedded <indexterm> information for just those areas that are now in the membersOnly sections. So

I would recommend you to do this in two steps. During the first step just filter content and then do real processing in the second stage. This will significantly simplify things.

I agree with this. In particular, if you were to normalize all the div* elements to simple "div" (assuming you still need them at all :-), you'd find you lost no functionality (it's easy to determine or work off of the depth of any element, when necessary) but your XPaths would become significantly simpler and neater, hence easier to write and debug.


I have a template that follows that gathers all the index terms together and try's to group them with the saxon:group function (I'm still using XSLT v1 at this point).

Generating index with all bells and whistles is not an easy task. I would suggest you to convert your document to DocBook and use existing stylesheets (http://docbook.sf.net/) that support both conditional processing and indexes out-of-the box. It seems that your document can be converted to DocBook in a pretty straightforward way.

This could be true, though you should assess it carefully: I'd say it depends on a number of contingent factors, such as whether Docbook's bells and whistles are the ones you want, and whether you already know Docbook or would also benefit in other ways by getting into it. (In other words, this is the classic trade-off between bespoke and off-the-shelf.)


At a minimum, Docbook's code is certainly good and well worth looking at for real-world solutions to this kind of problem.

Cheers,
Wendell


====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================

Current Thread