You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Frey, David" <DF...@nationaljournal.com> on 2005/05/11 18:22:20 UTC

Generate via Multiple Documents

Hello All,

I'm fairly new to Cocoon, using it for about the past 3 months. And am not
sure where to start with the following problem:

-I need Cocoon to find all the xml based files in a directory.  All of these
xml based files will be the same in format with differences in content.

-Cocoon will then need to strip a title element out of each page and in
effect build another xml document who's content will only be the title
element from each of these documents.

So what would be the best way to solve this problem, any help would be
greatly appreciated.

Thanks,
David


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


Re: Generate via Multiple Documents

Posted by "Frey, David" <DF...@nationaljournal.com>.
I've been looking at those two pages as well.  Very good.  Just wanted to
make sure before giving it a wack.

Thanks again for your help!

Best,
David


On 5/11/05 1:03 PM, "Gerald Aichholzer" <ga...@iicm.tu-graz.ac.at> wrote:

> Frey, David wrote:
>> Thank you Gerald.
>> 
>> So if I understand this correctly, I can add an 'xpath' parameter to the
>> generator in the pipeline.  The value of the 'xpath' parameter will be an
>> xpath expression to search for in each of the files of the specified
>> directory.  The matching elements will then be generated into another
>> document?
>> 
>> Is this correct?
>> 
> 
> Exactly - at least according to my experience.
> 
> I assume you have already found this link:
> http://cocoon.apache.org/2.1/userdocs/generators/xpathdirectory-generator.html
> 
> So you'd have to set up a pipeline with the XPathDirectoryGenerator as
> generator and transform its result using an XSLT-Transformer to match
> your preferred XML-format.
> 
> This URL (just found with Google) might help, too:
> http://xml.grumpykitty.biz/staticSiteArticle.html
> 
> HTH,
> Gerald
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 


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


Re: Generate via Multiple Documents

Posted by Gerald Aichholzer <ga...@iicm.tu-graz.ac.at>.
Frey, David wrote:
> Thank you Gerald.  
> 
> So if I understand this correctly, I can add an 'xpath' parameter to the
> generator in the pipeline.  The value of the 'xpath' parameter will be an
> xpath expression to search for in each of the files of the specified
> directory.  The matching elements will then be generated into another
> document?
> 
> Is this correct?
> 

Exactly - at least according to my experience.

I assume you have already found this link:
http://cocoon.apache.org/2.1/userdocs/generators/xpathdirectory-generator.html

So you'd have to set up a pipeline with the XPathDirectoryGenerator as
generator and transform its result using an XSLT-Transformer to match
your preferred XML-format.

This URL (just found with Google) might help, too:
http://xml.grumpykitty.biz/staticSiteArticle.html

HTH,
Gerald

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


Re: Generate via Multiple Documents

Posted by "Frey, David" <DF...@nationaljournal.com>.
Thank you Gerald.  

So if I understand this correctly, I can add an 'xpath' parameter to the
generator in the pipeline.  The value of the 'xpath' parameter will be an
xpath expression to search for in each of the files of the specified
directory.  The matching elements will then be generated into another
document?

Is this correct?

Thanks again!
David


On 5/11/05 12:32 PM, "Gerald Aichholzer" <ga...@iicm.tu-graz.ac.at> wrote:

> Hello David,
> 
> Frey, David wrote:
>> 
>> I'm fairly new to Cocoon, using it for about the past 3 months. And am not
>> sure where to start with the following problem:
>> 
>> -I need Cocoon to find all the xml based files in a directory.  All of these
>> xml based files will be the same in format with differences in content.
>> 
>> -Cocoon will then need to strip a title element out of each page and in
>> effect build another xml document who's content will only be the title
>> element from each of these documents.
>> 
>> So what would be the best way to solve this problem, any help would be
>> greatly appreciated.
>> 
> 
> have a look at the XPathDirectoryGenerator - I think it meets your
> requirements perfectly.
> 
> HTH,
> Gerald
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 


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


Re: Generate via Multiple Documents

Posted by Gerald Aichholzer <ga...@iicm.tu-graz.ac.at>.
Hello David,

Frey, David wrote:
> 
> I'm fairly new to Cocoon, using it for about the past 3 months. And am not
> sure where to start with the following problem:
> 
> -I need Cocoon to find all the xml based files in a directory.  All of these
> xml based files will be the same in format with differences in content.
> 
> -Cocoon will then need to strip a title element out of each page and in
> effect build another xml document who's content will only be the title
> element from each of these documents.
> 
> So what would be the best way to solve this problem, any help would be
> greatly appreciated.
> 

have a look at the XPathDirectoryGenerator - I think it meets your
requirements perfectly.

HTH,
Gerald

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