Re: PROPOSAL (round 2): Extensions to MDR XMI API
Holger Krug <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.mdr.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Aug 01, 2002 at 06:13:53PM +0200, Martin Matula wrote:
> > The new API is notably more complex than the previous one. More tutorial
> > documentation will need to be provided. As a potential user of this API,
> > I would like to see how it works in a "chain" of XML processing like
> > Holger mentioned before: Repository -> XMIWriter -> XSLT processing ->
> > file; file -> XSLT processing -> XMIReader -> repository.
>
> I guess that what Holger had in mind was that there needs to be no file
> in between. Instead, you would do a transformation using transformers
> that consume XMIWriter's output (by implementing ContentHandler
> interfaces), transform it and produce transformed output to another
> ContentHandler which can be either another transformer or XMIReader (as
> it implements ContentHandler interface).
Yes ! Take a look at http://xml.apache.org/cocoon to see what that
means in practice. Cocoon is a web publishing framework where you can
define such chains (they call it pipeline). Cocoon can be a source of
inspiration for XML-related designs also in other application areas.
As a note only:
To see how Cocoon works take a look at our new website
http://www.rationalizer.com. It is currently only in German and does
not work very well with old versions of Netscape/Mozilla, but that
does not matter for that purpose. The strange thing is, that, as you
can detect from the URLs, almost all pages there are OpenOffice
documents. Because the OpenOffice file format is zipped XML, we use
Cocoon and chain the documents through a pipeline:
OpenOffice -> Docbook -> XHTML (the text part of the web-page) -> HTML
(the whole page)
All the conversions are done using implementations of the SAX
interfaces. Because there is no serialization to XML and parsing from
XML in between it is quite performant.
Returning to XMI/MDR:
Using a XMI2HTML conversion XSLT stylesheet it would be very easy to
provide online repository browsing in the following way:
(1) (2) (3)
MDR -> XMI -> HTML -> HTML
(1) XMIWriter writes to ChangeSource
(2) XSLT_based conversion to HTML
(3) putting on a web-page with Menu etc. (also XSLT-based)
--
Holger Krug
[email protected]