W3C Document Object Model (DOM) |
|
Discussion: This page is concerned with some experimental patches to get CVS to generate XML/HTML which can then be used for scripting CVS using the DOM. This has the potential to allow scripts to have a _much_ cleaner interface to CVS. Right now it is a proof of concept (that is, it does not give scripts access to all of CVS's features), but extending it probably wouldn't be too hard. Demo To see how this works, look at the following demo of the "cvs log" and show/hide various fields, all without contacting the web server. If you want the demo to actually run, you need a browser which supports ECMAscript (javascript) and DOM (see disclaimers below). The cool thing is that even with a totally vanilla browser, you can see the plain text output from "cvs log". The demo page is a static page which was produced on a one-shot basis using the tools below. Of course, running something like this from a live repository is how you would use this approach in practice. How Does it Work? First, the data is generated by a modified CVS server which outputs tagged text for cvs log. Tagged text ("MT" response) is a general-purpose feature. There is nothing hackish about the patch which enables tagged text.
Second, a CGI script takes that data and converts the
tagged text to XML/HTML. The conversion does not need
to know about particular tags - tagged text is very
similar to XML/HTML and conversion is easy. For
example, Third, your browser displays the XML/HTML. The code which actually lets the client show and hide fields is written in ECMAscript. The DOM is the interface by which ECMAscript code has a clean way to access particular parts of the XML/HTML document. |
Return to The Information Page List.
![[ Valid XHTML 1.0! ]](/branding/w3c-valid-xhtml10-44x16.png)
![[ Valid CSS! ]](/branding/w3c-valid-css-44x16.png)
