Including remote html-pages on a Zope server (with extracting of the title and body of the remote page)
Hello, I'm currently trying to setup a Zope server within our company. Our current intranet is based on a static Apache server, and frames are used for navigation. I would like to get rid of the frames and convert them to HTML-tables. Because I first need to show the concept, and get the new server up and running, I need a script which can insert the contents of an external HTML-page (our old server) into a cell of the table if there is no corresponding file on the Zope-server. Examples: http://zope.foo.org/ (the new zope server) http://zope.foo.org/somepage_html (a DTML-file on the zope server, no external HTML-page needed) http://zope.foo.org/apachedoc.html (a file which doesn't exist on the Zope server, but which does exist on http://oldserver.foo.org/apachedoc.html. The Zope-server should retrieve http://oldserver.foo.org/apachedoc.html (using httplib) and should put the body of the file in a HTML-cell. I found a very usefull Howto at http://www.zope.org/Members/cba/Get_External ("How-To: Including the contents of an external HTML page") and tried to get my script working by using the standard_error_message (Yes, I know it's uggly). Questions: a) has anybody done something like this before? b) is there a neat solution for inserting a Python/DTML-script before standard_error_message gets executed? c) if I got the script working I would like to extract the title and body out of the remote page. I found an XML-suite, http://www.4suite.org/, but I doubt how it will work with non-valid HTML-pages (which unfortuately exist on our old server). Does anybody got some pieces of Python/DTML for this job? I'm fairly new with Zope/Python/DTML so any help would be appreciated. Regards, Pieter Biemond
Have a look in the HowTos: Including the contents of an external HTML page. Best regards Arno Gross, email: arno.gross@consotec.de On Fri, 16 Feb 2001, Pieter Biemond wrote:
Hello,
I'm currently trying to setup a Zope server within our company. Our current intranet is based on a static Apache server, and frames are used for navigation. I would like to get rid of the frames and convert them to HTML-tables. Because I first need to show the concept, and get the new server up and running, I need a script which can insert the contents of an external HTML-page (our old server) into a cell of the table if there is no corresponding file on the Zope-server.
Examples: http://zope.foo.org/ (the new zope server) http://zope.foo.org/somepage_html (a DTML-file on the zope server, no external HTML-page needed)
http://zope.foo.org/apachedoc.html (a file which doesn't exist on the Zope server, but which does exist on http://oldserver.foo.org/apachedoc.html. The Zope-server should retrieve http://oldserver.foo.org/apachedoc.html (using httplib) and should put the body of the file in a HTML-cell.
I found a very usefull Howto at http://www.zope.org/Members/cba/Get_External ("How-To: Including the contents of an external HTML page") and tried to get my script working by using the standard_error_message (Yes, I know it's uggly).
Questions: a) has anybody done something like this before? b) is there a neat solution for inserting a Python/DTML-script before standard_error_message gets executed? c) if I got the script working I would like to extract the title and body out of the remote page. I found an XML-suite, http://www.4suite.org/, but I doubt how it will work with non-valid HTML-pages (which unfortuately exist on our old server). Does anybody got some pieces of Python/DTML for this job? I'm fairly new with Zope/Python/DTML so any help would be appreciated.
Regards,
Pieter Biemond
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Arno Gross -
Pieter Biemond