version 1.2, 2006/12/22 11:56:08
|
version 1.4, 2007/02/08 12:00:23
|
Line 2
|
Line 2
|
Author splitter |
Author splitter |
""" |
""" |
|
|
import Zope |
import Zope2 |
|
import transaction |
|
|
from Products.ZCTextIndex.ISplitter import ISplitter |
from Products.ZCTextIndex.ISplitter import ISplitter |
from Products.ZCTextIndex.PipelineFactory import element_factory |
from Products.ZCTextIndex.PipelineFactory import element_factory |
Line 82 class graphemeSplitter:
|
Line 83 class graphemeSplitter:
|
if not (w==''): |
if not (w==''): |
if pNum: #only whe pnum is found (first call of the splitter, is always called twice in the pipeline |
if pNum: #only whe pnum is found (first call of the splitter, is always called twice in the pipeline |
Zope.app().cdliRoot.storeInLineIndex(w.lstrip().strip(),(pNum,lineNum)) |
Zope.app().cdliRoot.storeInLineIndex(w.lstrip().strip(),(pNum,lineNum)) |
get_transaction().commit() |
transaction.get().commit() |
|
|
result.append(w.lstrip().rstrip()) |
result.append(w.lstrip().rstrip()) |
return result |
return result |