xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

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
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor