Hi,

thanks for all the answers, here is the result:

use Directory Generator:

<!-- find files for transformation -->
    <map:match pattern="testhtml.html">
    <map:generate type="directory" src="{1}"/>
    <map:transform src="stylesheets/system/directory2html.xsl"/>
    <map:serialize type="html"/>
   </map:match>

use pipeline:

   <map:match pattern="resources/**/*.xml">
   <map:generate src="resources/test/{2}.xml"/>
   <map:transform src="stylesheets/junit/junit-noframes.xsl"/>
   <map:serialize type="html"/>
  </map:match>

erik

PS.: Anyway, Director Generator only lists folders recursivly when it starts
in the cocoon root...

-----Original Message-----
From: Erik Stunkat [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 12, 2001 2:57 PM
To: [EMAIL PROTECTED]
Subject: RE: find xml files in a directory, list them and render to html


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
[EMAIL PROTECTED]


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:[EMAIL PROTECTED]]
> Sent: Montag, 12. November 2001 12:27
> To: [EMAIL PROTECTED]
> 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
> >[EMAIL PROTECTED]
> >
> >
> >---------------------------------------------------------------------
> >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: <[EMAIL PROTECTED]>
> >For additional commands, e-mail: <[EMAIL PROTECTED]>
>
>
>
>
> ---------------------------------------------------------------------
> 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: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
>
>
> ---------------------------------------------------------------------
> 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: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>

---------------------------------------------------------------------
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>


---------------------------------------------------------------------
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>


---------------------------------------------------------------------
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to