version 1.178, 2004/10/14 09:48:50
|
version 1.179, 2004/10/18 17:00:09
|
Line 39 from Ft.Xml import EMPTY_NAMESPACE
|
Line 39 from Ft.Xml import EMPTY_NAMESPACE
|
|
|
import Ft.Xml.XPath |
import Ft.Xml.XPath |
import cStringIO |
import cStringIO |
|
import zLOG |
|
|
try: |
try: |
from psycopg import libpq |
from psycopg import libpq |
Line 1142 class ECHO_resource(Folder,Persistent):
|
Line 1143 class ECHO_resource(Folder,Persistent):
|
|
|
def getFullTextXML(self,noredirect=None): |
def getFullTextXML(self,noredirect=None): |
"""getFullTextXML; gives the FullText as an XML Document, and <error></error> if somthing goes wrong.""" |
"""getFullTextXML; gives the FullText as an XML Document, and <error></error> if somthing goes wrong.""" |
|
zLOG.LOG("ECHO Fulltext",zLOG.INFO,"open %s"%self.metalink) |
try: |
try: |
|
zLOG.LOG("ECHO Fulltext",zLOG.INFO,"open %s"%self.metalink) |
fh=ECHO_helpers.urlopen(self.metalink) |
fh=ECHO_helpers.urlopen(self.metalink) |
|
zLOG.LOG("ECHO Fulltext",zLOG.INFO,"opened %s"%self.metalink) |
dom=xml.dom.minidom.parse(fh) |
dom=xml.dom.minidom.parse(fh) |
texttools=dom.getElementsByTagName('texttool') |
texttools=dom.getElementsByTagName('texttool') |
text=texttools[0].getElementsByTagName('text') |
text=texttools[0].getElementsByTagName('text') |
texturl=getText(text[0].childNodes) |
texturl=getText(text[0].childNodes) |
|
zLOG.LOG("ECHO Fulltext",zLOG.INFO,"found %s"%texturl) |
|
fh.close() |
if not (texturl.split(":")[0] in ['http','ftp','file']): |
if not (texturl.split(":")[0] in ['http','ftp','file']): |
texturl=re.sub("//","/",texturl) |
texturl=re.sub("//","/",texturl) |
#return texturl+"::"+texturl.split(":")[0] |
#return texturl+"::"+texturl.split(":")[0] |