You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by icewind <ic...@yahoo.com> on 2002/07/18 20:21:03 UTC

aggregation questions

I have two separate questions relating to
<map:aggregate>

1. I have a bunch of <map:part> tags within a
<map:aggregate> tag. Each xml file that is referenced
in the map:part tags contains lists of the full path
names to other xml files. (The whole purpose of this
thing is to make a list of links the user can click
on) The problem is, if for instance, one of the
filenames in one of the <map:part> files is
mis-spelled, the whole things will stop, and none of
the following map:part files will be processed. (A
mis-spelling causes this because I extract the
contents of a tag out of each xml file listed in each
of the <map:part> files. If it cant find a filename,
it just stops.) So, the question is how can I have
cocoon just skip over a file that it cant find and go
on to the next map:part gracefully?

2. Is there anyway to say you want to aggregate all
the files in form file-x.xml where x is some number?
Or must you specify each part of an aggregation in the
sitemap?



__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com

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

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


RE: aggregation questions

Posted by Peter Schwenke <pe...@bluetoad.com.au>.
I had a look at this quite a few weeks ago when I was looking to do some
aggregation where the <map:part>'s were different web sites.  I
trawled the archive and found the patch referred to in bug 10208.

In the http case it is more difficult to solve because the exception
was further down.  You can't easily determine that you'll get a
problem until you try to access the URL and it fails (because the
machine is down).  I can't remember the details
but I had a good fiddle with it.  I'm still working with 2.0.1
(because we had to put a stake in the ground a while back) so I
figured I'll investigate it when I upgrade and actually need to do the
work requiring the aggregation.  (The code from CVS HEAD used some
different pieces  and some other things which might have made it
easier to get the exception). 

WebServiceProxyGenerator has been announced since then.  Would it
help in trying to solve the problem of aggregating parts from remote
sites and being able to easily trap the error.  I say that without
having investigated - I just made a mental note of it.

One thing that would also be nice is if such a thing would keep track
of sites which are down so you don't get the long network delay.  That
is a whole can of worms, though...

So while it's on topic any hints?  I don't mind doing some work on it.

                                                           ...Peter

Vadim Gritsenko writes:
 > > From: icewind [mailto:icewind0@yahoo.com]
 > > 
 > > I have two separate questions relating to
 > > <map:aggregate>
 > > 
 > > 1. I have a bunch of <map:part> tags within a
 > > <map:aggregate> tag. Each xml file that is referenced
 > > in the map:part tags contains lists of the full path
 > > names to other xml files. (The whole purpose of this
 > > thing is to make a list of links the user can click
 > > on) The problem is, if for instance, one of the
 > > filenames in one of the <map:part> files is
 > > mis-spelled, the whole things will stop, and none of
 > > the following map:part files will be processed. (A
 > > mis-spelling causes this because I extract the
 > > contents of a tag out of each xml file listed in each
 > > of the <map:part> files. If it cant find a filename,
 > > it just stops.) So, the question is how can I have
 > > cocoon just skip over a file that it cant find and go
 > > on to the next map:part gracefully?
 > 
 > See http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10208

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

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


RE: aggregation questions

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: icewind [mailto:icewind0@yahoo.com]
> 
> I have two separate questions relating to
> <map:aggregate>
> 
> 1. I have a bunch of <map:part> tags within a
> <map:aggregate> tag. Each xml file that is referenced
> in the map:part tags contains lists of the full path
> names to other xml files. (The whole purpose of this
> thing is to make a list of links the user can click
> on) The problem is, if for instance, one of the
> filenames in one of the <map:part> files is
> mis-spelled, the whole things will stop, and none of
> the following map:part files will be processed. (A
> mis-spelling causes this because I extract the
> contents of a tag out of each xml file listed in each
> of the <map:part> files. If it cant find a filename,
> it just stops.) So, the question is how can I have
> cocoon just skip over a file that it cant find and go
> on to the next map:part gracefully?

See http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10208

 
> 2. Is there anyway to say you want to aggregate all
> the files in form file-x.xml where x is some number?
> Or must you specify each part of an aggregation in the
> sitemap?

Yes. Combination of DirectoryGenerator, simple XSLT transformation (file
- to - cinclude tag), and CInclude.


Vadim



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

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