Instrumenting a Docbase for Collaborative Review
To transform an XML repository into an HTML docbase with an NNTP discussion component, you need to do the following three things.
- Insert link targets into the docbase
Links in the discussion area point back to these targets, as do links in the web-based table of contents.
- Insert comment links into the docbase
These links invoke the comment form, or rather the script that generates that form. The links encode the information that the script needs to produce an NNTP message that will bind to the right spot in the newsgroup and that will point back to the right spot in the docbase.
- Create the initial discussion framework
The docbase’s headers (
h1..h6
) define the desired structure. To populate the newsgroup accordingly, you generate a set of NNTP messages whoseMessage-ID:
andReferences:
headers correspond to that structure; then load those messages using one of several techniques. Let’s consider each of these three steps in more detail.
Inserting Link Targets into the Docbase
We want to
translate <p>
or
<li>
into <a name="252"><p>
or <a name="1124"><li>
so that comments posted regarding
these elements can point back to the right spot in the text.
Although the final solution I’ll present uses Perl’s XML::Parser, the examples in Example 9.3 and Example 9.4 use two other parsers, one driven by Java and one by JavaScript. Why? There’s more than one way to do it, and that can come in handy when you’re stuck. For example, when I started working ...
Get Practical Internet Groupware now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.