From: Wolfgang M. M. <wol...@us...> - 2004-07-16 17:40:22
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/text In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28961/src/org/exist/xquery/functions/text Modified Files: MatchCount.java Log Message: Fixed text:match-count function. Index: MatchCount.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/text/MatchCount.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MatchCount.java 17 May 2004 12:17:32 -0000 1.1 --- MatchCount.java 16 Jul 2004 17:39:40 -0000 1.2 *************** *** 76,80 **** throw new XPathException(getName() + " cannot be applied to XQuery-constructed nodes."); NodeProxy np = (NodeProxy)nv; ! for(Match nextMatch = np.match; nextMatch != null; count++) { nextMatch = nextMatch.getNextMatch(); } --- 76,81 ---- throw new XPathException(getName() + " cannot be applied to XQuery-constructed nodes."); NodeProxy np = (NodeProxy)nv; ! for(Match nextMatch = np.match; nextMatch != null; ) { ! count += nextMatch.getFrequency(); nextMatch = nextMatch.getNextMatch(); } |