Subject: Re: [xsl] Counting Word Occurences From: David Carlisle <davidc@xxxxxxxxx> Date: Tue, 19 Dec 2000 16:51:13 GMT |
<xsl:variable name="text" select="div/abstract"/> <xsl:if test="contains($text, $keyword)"> If you do that, then text is a node set containing each of the abstract nodes, and when you use a node set in a string context then you get the string value of the first node in the set. <xsl:variable name="text"> <xsl:copy-of select="div/abstract"/> </xsl:variable> <xsl:if test="contains($text, $keyword)"> now text is an rtf (or node set in xslt 1.1) with just a single root node and child abstract nodes. So now when used in a string context you get the string value of the root node, ie th estring value of all the children. David _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Control Centre. For further information visit http://www.star.net.uk/stats.asp XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Counting Word Occurences, Kirk V. Hastings | Thread | [xsl] Dynamic creation of frames & , Linda Santiago |
Re: [xsl] Ann: Xsldoc - XSLT Source, David Delgranche | Date | RE: [xsl] Dynamic creation of frame, Gottesman, Elisheva |
Month |