cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Stunkat" <er...@poet.de>
Subject RE: find xml files in a directory, list them and render to html
Date Mon, 12 Nov 2001 13:56:39 GMT
Hi,


use Directory Generator to list various files in a folder

<map:match pattern="testhtml.html">
    <map:generate type="directory" src="resources/test"/>
    <map:transform src="stylesheets/system/directory2html.xsl"/>
    <map:serialize type="html"/>
   </map:match>

What I get:

<tr>
<td><a href="junit.xml">junit.xml</a></td><td>11/6/01 12:23
PM</td>
</tr>


OK, I have xml files there and want to transform them to html:

<map:match pattern="resources/test/*.xml">  // tried html instead - doesn´t
work
    <map:generate type="file" src="resources/test/{1}.xml"/>
    <map:transform src="stylesheets/junit/junit-noframes.xsl"/>
    <map:serialize type="html"/>
  </map:match>


that´s fine when I change the URL from /junit.xml to junit.html manually, as
there is no html file to point to and no mapping.

Any ideas to tell Cocoon I want xxx.html instead of xxx.xml when I go to the
URLs? I cannot map in samples.xml as I don´t know before which xml files
will be there.


Thanks!

Erik Stunkat
QA
POET Software
Hamburg, Germany
+49(0)40 60990-303
eriks@poet.de


Hi,

i think it is possible to do what you want.
Especially with C2. But i think you have to
take a look at the DirectoryGenerator and maybe
use it or modify it for you needs.

HTH

Max

> -----Original Message-----
> From: Erik Stunkat [mailto:eriks@poet.de]
> Sent: Montag, 12. November 2001 12:27
> To: cocoon-users@xml.apache.org
> Subject: RE: find xml files in a directory, list them and
> render to html
>
>
> Hi Alex,
> thanks, thats not really the problem: what I want to do with
> Cocoon is to
> view various xml files in one directory and link to them on
> the fly. When
> this can?t work I have to use Ant to build sitemaps, I
> thought I would be
> easier with Cocoon.
>
> regards
> erik
>
> Hi,
> I think Ant would be very useful for you. With Ant it is easy
> to launch
> your JUnit tests, copy/move files and launch other java programs.
> Regards
> Alex
>
> At 11:46 12/11/2001 +0100, you wrote:
> >Hi,
> >
> >For our test framework we have this workaround:
> >
> >1. Buildprocess
> >2. create junit test
> >3. create html from junitreports, versioning etc.
> >
> >What I want:
> >
> >1. move xml files to a specific cocoon folder
> >2. list the xml files (Directory Generator ??)
> >3. Create html output (xsl)
> >
> >Nr. 3 is fine...
> >
> >How can I do step 2; list files and open them from there? There is an
> >increasing number of files, creating the directory should be
> dynamic. What
> >about the links?
> >
> >Any ideas??
> >
> >Erik Stunkat
> >QA
> >POET Software
> >Hamburg, Germany
> >+49(0)40 60990-303
> >eriks@poet.de
> >
> >
> >---------------------------------------------------------------------
> >Please check that your question has not already been answered in the
> >FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> >To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> >For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message