Re: [xsl] How to show context of term in text document?

Subject: Re: [xsl] How to show context of term in text document?
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Wed, 02 May 2007 18:42:35 +0200
Antony Quinn wrote:


I want to show the 5 words before and after "nutrient":

... The aforementioned oxygenated *nutrient* emulsion (using the fluorocarbon FC-80) ...


The following template changes your 'nutrient' to bold:


   <xsl:template match="z:e">
       <xsl:value-of select="preceding-sibling::text()" />
       <b>
           <xsl:value-of select="." />
       </b>
       <xsl:value-of select="following-sibling::text()" />
   </xsl:template>


Cheers, -- Abel Braaksma

Current Thread