version 1.2, 2006/12/22 11:56:08
|
version 1.3, 2007/01/24 18:05:24
|
Line 3 Author splitter
|
Line 3 Author splitter
|
""" |
""" |
|
|
import Zope |
import Zope |
|
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 |