From: Wolfgang M. M. <wol...@us...> - 2004-09-12 09:26:00
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/text In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21081/src/org/exist/xquery/functions/text Modified Files: MatchCount.java TextRank.java Log Message: * Added support for XQuery pragmas to set serialization and watchdog settings. * org.exist.storage.serializers.Serializer now passes all output to an instance of the Receiver interface instead of a SAX ContentHandler. Receiver resembles SAX, but has methods that are closer to eXist's internal storage. For example, it directly accepts a QName in startElement to avoid unnecessary string allocations. * Fixed various performance leaks in cross-document joins. Index: MatchCount.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/text/MatchCount.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MatchCount.java 16 Jul 2004 17:39:40 -0000 1.2 --- MatchCount.java 12 Sep 2004 09:25:16 -0000 1.3 *************** *** 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.getFrequency(); nextMatch = nextMatch.getNextMatch(); --- 76,80 ---- throw new XPathException(getName() + " cannot be applied to XQuery-constructed nodes."); NodeProxy np = (NodeProxy)nv; ! for(Match nextMatch = np.getMatches(); nextMatch != null; ) { count += nextMatch.getFrequency(); nextMatch = nextMatch.getNextMatch(); Index: TextRank.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/text/TextRank.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TextRank.java 14 Jul 2004 19:03:25 -0000 1.2 --- TextRank.java 12 Sep 2004 09:25:16 -0000 1.3 *************** *** 68,72 **** int freq = 0; ! Match nextMatch = proxy.match; // we just count the number of distinct terms matched while(nextMatch != null) { --- 68,72 ---- int freq = 0; ! Match nextMatch = proxy.getMatches(); // we just count the number of distinct terms matched while(nextMatch != null) { |