cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christina" <>
Subject Re: Read and Display Non-XML files
Date Thu, 05 Aug 2004 00:43:10 GMT
I tried this, but as sooon as  the file goes into this "xml-based" pipline, all returns and
white spaces disapear, the file turns into a huge string...

  ----- Original Message ----- 
  From: Mark Lundquist 
  Sent: Wednesday, August 04, 2004 1:14 PM
  Subject: Re: Read and Display Non-XML files

  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

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

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

  Then in yer pipeline:

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

  Lotsa luck,

View raw message