You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Gerhard Froehlich <g-...@gmx.de> on 2001/07/28 18:20:08 UTC
[c2 proposal] map:aggregate
Hi,
Following proposal:
The map:aggregate functionality is very usefull I think. But it's very
laborious when you have many xml documents to aggregate. Take a look in
the xdocs, there are more then 77 documents.
I think it would be more comfortable if you can say "take all valid xml
documents from this directory
and aggregate them". Maybe with subdirectories?
What do you think?
Cheers
Gerhard
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: [c2 proposal] map:aggregate
Posted by giacomo <gi...@apache.org>.
On Sat, 28 Jul 2001, Gerhard Froehlich wrote:
> Hi,
> Following proposal:
> The map:aggregate functionality is very usefull I think. But it's very
> laborious when you have many xml documents to aggregate. Take a look in
> the xdocs, there are more then 77 documents.
>
> I think it would be more comfortable if you can say "take all valid xml
> documents from this directory
> and aggregate them". Maybe with subdirectories?
I know the map:aggregate is not very dynamic (which it never wanted to
be). It is very static in the way you have to specify the parts of your
pipeline. For dynamic aggregation C/XIncludeTransformer are the better
choice. The best you can achieve is to combine both, map:aggregate for
layout aggregation and C/XInclude for content aggregation.
But how about this:
Write an xsp page that scans a directory (specified by parameter) and
writes them as include for the XIncludeTransformer following it in the
pipeline.
Giacomo
>
> What do you think?
>
> Cheers
> Gerhard
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: [c2 proposal] map:aggregate
Posted by Michael Hartle <mh...@hartle-klug.com>.
Vadim Gritsenko wrote:
>>But - hopefully - we have other solution: X/Cinclude mechanism
>>which is perfectly suitable in this case:
>>
>><map:match pattern="documents_pdf/documentation.pdf">
>> <map:generate type="directory" src="docs/xdocs"/>
>> <map:transform src="filter-xml-files.xsl"/>
>> <map:transform src="xml-file-to-xinclude.xsl"/>
>> <map:transform type="xinclude"/>
>> <!-- here you have all xdocs in one stream -->
>> ....
>></map:match>
>>
This way worked perfectly for aggregating XML news articles in a
directory subtree, I used
<map:match pattern="collection/news-overview.xml">
<map:generate type="directory" src="repository/news/current">
<map:parameter name="root" value="repository"/>
<map:parameter name="depth" value="2"/>
</map:generate>
<map:transform src="stylesheets/directory-to-xinclude.xsl"/>
<map:transform type="xinclude"/>
<map:serialize type="xml"/>
</map:match>
for generating a collection document containing all current news in the
repository which in turn can then be aggregated to the pages in need for
news. I attached the directory-to-xinclude.xsl I wrote; a drawback of
this solution is that the DirectoryGenerator does not provide caching of
its results.
Best regards,
Michael
RE: [c2 proposal] map:aggregate
Posted by giacomo <gi...@apache.org>.
On Sat, 28 Jul 2001, Vadim Gritsenko wrote:
> > -----Original Message-----
> > From: Gerhard Froehlich [mailto:g-froehlich@gmx.de]
> > Sent: Saturday, July 28, 2001 12:43 PM
> > To: cocoon-dev@xml.apache.org
> > Subject: AW: [c2 proposal] map:aggregate
> >
> >
> > Hi,
> > maybe this is a special problem. But I wanted to transform
> > the xdocs in one pdf document. And when I use the normal
>
> I also thought about generating PDF out of Cocoon xdocs. That would be cool!
>
>
> > aggregation I have to aggregate them handish, or?
> > <map:match pattern="documents_pdf/documentation.pdf">
> > <map:aggregate element="page" >
> > <map:part src="docs/xdoc/3rdparty.xml"/>
> > <map:part src="docs/xdoc/caching.xml"/>
> > ...
> > </map:aggregate>
> > </map:match>
>
> I see. But there is one problem - aggregator is used to aggregate not only files,
> but cocoon: protocol, http: protocol, file: protocol... So - AFAIU - it's really not in concern
> of aggregator to construct somehow list of aggregated resources (files in your case).
>
>
> > I also started to write my own Generator for this problem,
> > but this is quite a hack.
> >
> > What do you mean with "custom file generator".
>
> I meant your own Generator which you started to write :)
>
> But - hopefully - we have other solution: X/Cinclude mechanism
> which is perfectly suitable in this case:
>
> <map:match pattern="documents_pdf/documentation.pdf">
> <map:generate type="directory" src="docs/xdocs"/>
> <map:transform src="filter-xml-files.xsl"/>
> <map:transform src="xml-file-to-xinclude.xsl"/>
> <map:transform type="xinclude"/>
> <!-- here you have all xdocs in one stream -->
> ....
> </map:match>
Yes, this is a cool sample. And to put these xdocs into a layout use a
map:aggregate to combine the different layout pieces (header, navbar,
...) together
Giacomo
>
>
> This should solve your problem.
>
> Good luck with PDF!
>
> Vadim
>
> >
> > Cheers
> > Gerhard
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Vadim Gritsenko [mailto:vgritsenko@yahoo.com]
> > Gesendet: Saturday, July 28, 2001 6:32 PM
> > An: cocoon-dev@xml.apache.org
> > Betreff: RE: [c2 proposal] map:aggregate
> >
> >
> > Gerhard,
> >
> > Where this could be helpful?
> >
> > PS: Might be you need not aggregator but custom file generator.
> >
> > Vadim
> >
> > > -----Original Message-----
> > > From: Gerhard Froehlich [mailto:g-froehlich@gmx.de]
> > > Sent: Saturday, July 28, 2001 12:20 PM
> > > To: cocoon
> > > Subject: [c2 proposal] map:aggregate
> > >
> > >
> > > Hi,
> > > Following proposal:
> > > The map:aggregate functionality is very usefull I think. But it's very
> > > laborious when you have many xml documents to aggregate. Take a look in
> > > the xdocs, there are more then 77 documents.
> > >
> > > I think it would be more comfortable if you can say "take all valid xml
> > > documents from this directory
> > > and aggregate them". Maybe with subdirectories?
> > >
> > > What do you think?
> > >
> > > Cheers
> > > Gerhard
> > >
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
RE: [c2 proposal] map:aggregate
Posted by Vadim Gritsenko <vg...@yahoo.com>.
> -----Original Message-----
> From: Gerhard Froehlich [mailto:g-froehlich@gmx.de]
> Sent: Saturday, July 28, 2001 12:43 PM
> To: cocoon-dev@xml.apache.org
> Subject: AW: [c2 proposal] map:aggregate
>
>
> Hi,
> maybe this is a special problem. But I wanted to transform
> the xdocs in one pdf document. And when I use the normal
I also thought about generating PDF out of Cocoon xdocs. That would be cool!
> aggregation I have to aggregate them handish, or?
> <map:match pattern="documents_pdf/documentation.pdf">
> <map:aggregate element="page" >
> <map:part src="docs/xdoc/3rdparty.xml"/>
> <map:part src="docs/xdoc/caching.xml"/>
> ...
> </map:aggregate>
> </map:match>
I see. But there is one problem - aggregator is used to aggregate not only files,
but cocoon: protocol, http: protocol, file: protocol... So - AFAIU - it's really not in concern
of aggregator to construct somehow list of aggregated resources (files in your case).
> I also started to write my own Generator for this problem,
> but this is quite a hack.
>
> What do you mean with "custom file generator".
I meant your own Generator which you started to write :)
But - hopefully - we have other solution: X/Cinclude mechanism
which is perfectly suitable in this case:
<map:match pattern="documents_pdf/documentation.pdf">
<map:generate type="directory" src="docs/xdocs"/>
<map:transform src="filter-xml-files.xsl"/>
<map:transform src="xml-file-to-xinclude.xsl"/>
<map:transform type="xinclude"/>
<!-- here you have all xdocs in one stream -->
....
</map:match>
This should solve your problem.
Good luck with PDF!
Vadim
>
> Cheers
> Gerhard
>
> -----Ursprüngliche Nachricht-----
> Von: Vadim Gritsenko [mailto:vgritsenko@yahoo.com]
> Gesendet: Saturday, July 28, 2001 6:32 PM
> An: cocoon-dev@xml.apache.org
> Betreff: RE: [c2 proposal] map:aggregate
>
>
> Gerhard,
>
> Where this could be helpful?
>
> PS: Might be you need not aggregator but custom file generator.
>
> Vadim
>
> > -----Original Message-----
> > From: Gerhard Froehlich [mailto:g-froehlich@gmx.de]
> > Sent: Saturday, July 28, 2001 12:20 PM
> > To: cocoon
> > Subject: [c2 proposal] map:aggregate
> >
> >
> > Hi,
> > Following proposal:
> > The map:aggregate functionality is very usefull I think. But it's very
> > laborious when you have many xml documents to aggregate. Take a look in
> > the xdocs, there are more then 77 documents.
> >
> > I think it would be more comfortable if you can say "take all valid xml
> > documents from this directory
> > and aggregate them". Maybe with subdirectories?
> >
> > What do you think?
> >
> > Cheers
> > Gerhard
> >
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
AW: [c2 proposal] map:aggregate
Posted by Gerhard Froehlich <g-...@gmx.de>.
Hi,
maybe this is a special problem. But I wanted to transform
the xdocs in one pdf document. And when I use the normal
aggregation I have to aggregate them handish, or?
<map:match pattern="documents_pdf/documentation.pdf">
<map:aggregate element="page" >
<map:part src="docs/xdoc/3rdparty.xml"/>
<map:part src="docs/xdoc/caching.xml"/>
...
</map:aggregate>
</map:match>
I also started to write my own Generator for this problem,
but this is quite a hack.
What do you mean with "custom file generator".
Cheers
Gerhard
-----Ursprüngliche Nachricht-----
Von: Vadim Gritsenko [mailto:vgritsenko@yahoo.com]
Gesendet: Saturday, July 28, 2001 6:32 PM
An: cocoon-dev@xml.apache.org
Betreff: RE: [c2 proposal] map:aggregate
Gerhard,
Where this could be helpful?
PS: Might be you need not aggregator but custom file generator.
Vadim
> -----Original Message-----
> From: Gerhard Froehlich [mailto:g-froehlich@gmx.de]
> Sent: Saturday, July 28, 2001 12:20 PM
> To: cocoon
> Subject: [c2 proposal] map:aggregate
>
>
> Hi,
> Following proposal:
> The map:aggregate functionality is very usefull I think. But it's very
> laborious when you have many xml documents to aggregate. Take a look in
> the xdocs, there are more then 77 documents.
>
> I think it would be more comfortable if you can say "take all valid xml
> documents from this directory
> and aggregate them". Maybe with subdirectories?
>
> What do you think?
>
> Cheers
> Gerhard
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
RE: [c2 proposal] map:aggregate
Posted by Vadim Gritsenko <vg...@yahoo.com>.
Gerhard,
Where this could be helpful?
PS: Might be you need not aggregator but custom file generator.
Vadim
> -----Original Message-----
> From: Gerhard Froehlich [mailto:g-froehlich@gmx.de]
> Sent: Saturday, July 28, 2001 12:20 PM
> To: cocoon
> Subject: [c2 proposal] map:aggregate
>
>
> Hi,
> Following proposal:
> The map:aggregate functionality is very usefull I think. But it's very
> laborious when you have many xml documents to aggregate. Take a look in
> the xdocs, there are more then 77 documents.
>
> I think it would be more comfortable if you can say "take all valid xml
> documents from this directory
> and aggregate them". Maybe with subdirectories?
>
> What do you think?
>
> Cheers
> Gerhard
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org