cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lundquist ...@wrinkledog.com>
Subject Re: Read and Display Non-XML files
Date Wed, 04 Aug 2004 20:14:17 GMT

On Aug 4, 2004, at 3:59 PM, milkwaybridge wrote:

> I want to make a page which can diplay a file's content, this file can 
> be whatever format, like java, txt or etc.
>  but if I generate them with a file or html generator, all the 
> formatĀ is gone. the file becomes a huge string.
> Is there any kind of generator, reader or action can do this?
> Thank you for your information!!!

Never thought about this before, but here's what I'd try (maybe 
somebody else has a better suggestion...):

An XML doc like this, let's call it "page.jx"

	<content>
		<xi:include parse="text" href="$source" />
	</content>

Then in yer pipeline:

	.
	.
	.
	<map:generate type="jx" src="page.jx">
		<map:parameter name="source" value="(whatever)" />
	</map:generate>
	<map:transform type=xinclude" />
	<map:call resource="to-html" />	<!-- whatever -->

Lotsa luck,
~ml

Mime
View raw message