O'Reilly logo

Practical Internet Groupware by Jon Udell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Kit for Chapter 9

Example 1: Reviewable Docbases

To re-create the reviewable-docbase example, see http://udell.roninhouse.com/examples/ReviewableDocbase.zip which includes:

  • Chapter 1, in XML-ized HTML format

  • CSS style sheets for this chapter, and a table of contents

  • A script to transform the XML content into reviewable HTML content

  • Apparatus (a CGI form template, a form generator, and a form handler) used for the newsgroup version of the comment mechanism

The script, reviewable.pl, expects to read chap1.xml and write chap1.htm. It runs in one of two modes, governed by the $protocol variable in the script. If you use $protocol = 'mail', each header and paragraph will end with a link that begins an email message commenting on that element of the document.

If you instead use $protocol = 'news', the script will write a file called nntp_msgs. This file of NNTP messages defines the skeleton of a newsgroup used for collaborative review of the document. If you’re running a local NNTP server (see Chapter 13), you can load these messages into a newsgroup on that server, as shown in Example 9.9.

In the newsgroup version of this application, the links in the generated document will call the script comment.pl, which in turn reads and interpolates values into the form template comment.htm, which form is in turn handled by comment-handler.pl.

Requirement: the Perl XML::Parser module

To run the script, you’ll need Perl and the XML::Parser module. The build-it-yourself version of XML::Parser is on CPAN ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required