Commit ac7350b5 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Everything should work now. bt5 upgrade (not yet committed) will be necessaru...

Everything should work now. bt5 upgrade (not yet committed) will be necessaru to benefit from better guard in document_publication_workflow.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13480 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5436c864
...@@ -334,6 +334,7 @@ class Document(XMLObject, UrlMixIn): ...@@ -334,6 +334,7 @@ class Document(XMLObject, UrlMixIn):
, PropertySheet.Document , PropertySheet.Document
, PropertySheet.Url , PropertySheet.Url
, PropertySheet.Snapshot , PropertySheet.Snapshot
, PropertySheet.Periodicity
) )
# Declarative interfaces # Declarative interfaces
...@@ -998,10 +999,12 @@ class Document(XMLObject, UrlMixIn): ...@@ -998,10 +999,12 @@ class Document(XMLObject, UrlMixIn):
about any file format. about any file format.
Other possible applications: conversion of HTML Other possible applications: conversion of HTML
text to tiddie HTML such as described here: text to tiddy HTML such as described here:
http://www.xml.com/pub/a/2004/09/08/pyxml.html http://www.xml.com/pub/a/2004/09/08/pyxml.html
so that resulting text can be processed more so that resulting text can be processed more
easily by XSLT parsers. easily by XSLT parsers. Conversion of internal
links to images of an HTML document to local
links (in combindation with populate).
""" """
raise NotImplementedError raise NotImplementedError
...@@ -1034,3 +1037,38 @@ class Document(XMLObject, UrlMixIn): ...@@ -1034,3 +1037,38 @@ class Document(XMLObject, UrlMixIn):
del(self.snapshot_data) del(self.snapshot_data)
except AttributeError: except AttributeError:
pass pass
# Transformation API
def populateContent(self):
"""
Populates the Document with subcontent based on the
document base data.
This can be used for example to transform the XML
of an RSS feed into a single piece per news or
to transform an XML export from a database into
individual records. Other application: populate
an HTML text document with its images, used in
conversion with convertToBaseFormat.
NOTE: to be implemented as typed base method.
"""
pass
# Crawling API
def getContentURLList(self):
"""
Returns a list of URLs referenced by the content of this document.
NOTE: to be implemented as typed base method or
by subclass.
"""
pass
def updateContentFromURL(self):
"""
Download and update content of this document from its source URL.
NOTE: to be implemented here.
"""
pass
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment