Re: [xsl] How do I create an FO index from XHTML <meta> keyword tags?

Subject: Re: [xsl] How do I create an FO index from XHTML <meta> keyword tags?
From: "W. Eliot Kimber" <eliot@xxxxxxxxxx>
Date: Wed, 08 Jan 2003 09:42:46 -0600
Graham Hannington wrote:

(That is, the index terms in the <meta> tag are comma separated, and ":" is
used to indicate a primary/secondary index entry.  Nothing fancier than
this: I don't currently do "tertiary" - third-level - index entries, or even
- though perhaps I should - "see" or "see also" entries.)

I'd be very grateful for any tips or pointers on where to start.

Having adapted the Docbook indexing code myself I can tell you that it will probably be a challenge--it does some very subtle things that have taken me a good bit of puzzling to get a basic understanding of, although if wasn't hard to adapt the code to my own needs *as long as* the index entry markup was similar to Docbook's in structure (which it was in my case). The code uses XSLT keys in clever and non-obvious ways to enable the collection, sorting, and processing of index groups. I would say more about it here except that I'm in the process of developing a training module on exactly this topic, so I have to focus on that for now. But I will say that you can puzzle it out if you read the stuff in Dave P's XSLT FAQ on the Munchian method and then work carefully through the code (it will also help to expand the internal parsed entities that are used to hold the expressions used for the keys).


The challenge in your case will be that the meta tags are not at all like the structure of Docbook index entries.

One thing that might make your task easier is to do a two-step process:

1. Write a separate process that turns the meta tags into Docbook-style index entries (this would be facilitated by using the EXLST functions for string tokenization).

2. Process those new entries with the existing Docbook stuff.

Hope this helps.

Cheers,

E.
--
W. Eliot Kimber, eliot@xxxxxxxxxx
Consultant, ISOGEN International

1016 La Posada Dr., Suite 240
Austin, TX  78752 Phone: 512.656.4139


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread