cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Bergius <Henri.Berg...@iki.fi>
Subject [midgard-dev] Formatting engine for Midgard
Date Tue, 13 Jun 2000 07:44:11 GMT
Greetings!

There has been some discussion for including a
more flexible formatting engine for Midgard content.
The current :f modifier is OK, but it still isn't
anywhere near the requirements of professional
publishing.

I met Jukka some weeks ago, and we discussed the
Cocoon XML publishing environment. Cocoon is
practically just a formatting engine that passes
XML documents through a pipe of different stylesheets,
and handles cacheing of the generated content.

When thinking about this, it was quite clear,
that this is very near the formatting functionality
we wanted for Midgard.

If we could set up Midgard to interface with Cocoon
so that it would throw documents (article contents,
etc.) needing formatting to Cocoon, and let Cocoon
then come up with the correctly formatted content,
either from its cache, or by running the content
through a stylesheet pipe. Then Cocoon would return
the generated contents back to Midgard for serving.

>From PHP end, this could be something like:

<?php

	$article = mgd_get_article(123);

	$formatted_content = mgd_format_cocoon($article->content,
					'options to Cocoon');

	echo $formatted_content;

?>

What do you think? This would give us a very flexible
formatting engine for Midgard, without having to
reinvent the wheel anywhere. It would also give us
more options for cooperating with other Apache-related
projects.

Cocoon is built with Java, so we could develop some
kind of JNI interface between Midgard and Cocoon that
would enable Midgard to pass documents to Cocoon, and
enable Cocoon to store its stylesheets in Midgard
database.

/Bergie

-- 
-- Henri Bergius -- +358 40 525 1334 -- Henri.Bergius@iki.fi --
               http://www.iki.fi/Henri.Bergius


Mime
View raw message