xsl-list
[Top] [All Lists]

Re: [xsl] First occurrence of glossary term in whole document

2008-07-30 09:57:31
On Wed, Jul 30, 2008 at 03:27:39PM +0100, Marroc wrote:
I only want to process the first occurrence of each glossary
term in the document

If they are marked up, you can use a reverse axis to find
if there are earlier ones (if that's too slow you can do something
cunning with key() and position()).

If these are the terms you're replacing, and are not marked up, it
might be easiest to run XSLT twice, first to mark up the terms and
then to process them (or remove the markup from the ones you
don't want).

I've seen conversions with as many as 30 such steps in them -- it
can be much easier to manage than doing everything in one pass.

Liam

-- 
Liam Quin, W3C XML Activity Lead, http://www.w3.org/People/Quin/
http://www.holoweb.net/~liam/ * http://www.fromoldbooks.org/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--