You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Mark Lundquist <ml...@wrinkledog.com> on 2006/01/31 18:44:00 UTC

Questions re: source resolving porting from 2.1.6 => 2.1.8

Hi all,

I have a bunch of Cocoon apps based on 2.1.6, and I'm actually just 
rev-ing the first of these up to 2.1.8.  So far so good, mostly... but 
I have two questions:

1) Sources appear to be resolved differently.  Some background: my root 
sitemap is not located directly within the webapp context directory, 
instead of "webapp/sitemap.xmap", I have

	webapp/
		sitemap/
			main.xmap
			.
			. (other crap that included in main.xmap via XML entities)
			.

All file paths in the sitemap, e.g. 'src' attribute on generators and 
transformers now resolve relative to the parent directory of the the 
sitemap document (viz., "webapp/sitemap/"), where they always used to 
resolve relative to the mount point of the sitemap (the webapp context 
in the case of the root sitemap, i.e. "webapp/").  To get my 
application working again, I had to change all these attributes to use 
the "context:" protocol, then all was well.

So Question 1 is: is this how it's supposed to work now, or is this 
caused by some misconfiguration on my part, e.g. something I was 
supposed to have changed going from 2.1.6 to 2.1.8?

2) In a subsitemap area, I have some flowscript that invokes the 
SourceResolver on a file pathname, and then calls exists() on the 
result.  No matter what I try, I am not able to come up with a URL for 
the source that gets exists() to return true when I know that it should 
(i.e., the file _does_ exist!).  This _could_ be related to Question 
(1) above; however, it's not exactly the same thing, because in this 
sitemap, the sitemap.xmap file _is_ located directly within the 
subsitemap mount point.

(1) was an annoyance, but not a big deal and there I'm really just 
curious about whether it's really supposed to work that way.  (2) 
however is a show-stopper for me — I really need to figure out what the 
problem is here!

Any help much appreciated! :-)
—ml—


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


SOLVED — Questions re: source resolving porting from 2.1.6 => 2.1.8

Posted by Mark Lundquist <ml...@wrinkledog.com>.
It turns out I had some bad flowscript that just fortuitously 'worked' 
in 2.1.6.  When I fixed my flowscript, it worked fine.  The problem had 
nothing to do with the other difference I encountered btwn. 2.1.6 and 
2.1.8.

best regards,
—ml—


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


Re: Questions re: source resolving porting from 2.1.6 => 2.1.8

Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Jan 31, 2006, at 1:50 PM, Antonio Fiol Bonnín wrote:

> Could you please post the relevant parts of your sitemap, subsitemap
> and flowscript?
>
> In particular, I am interested in seeing any map:mount in your  
> sitemap(s).

Well, the mount looks like this:

     <match pattern="eforms-internal/**">
       <mount
             check-reload="yes"
             src="context:/eforms/"
             uri-prefix="eforms-internal"
         />
     </match>

As I mentioned, the "context:/" appears to be necessary now to get  
Cocoon to look in the webapp root instead of the directory containing  
the (parent) sitemap, since these are not the same.

> I had a strange similar thing, consisting in cocoon:/ URLs not being
> resolved properly on flowscript called by subsitemaps. This was on
> 2.1.7, but although we migrated our app from 2.1.5.1 to 2.1.7 and now
> to 2.1.8, we had not called flowscript from the subsitemap with
> 2.1.5.1. So I don't know if it was a regression.
>
> The problem I had is explained on:
> http://mail-archives.apache.org/mod_mbox/cocoon-users/200508.mbox/ 
> %3Cb67708530508302339ba86d82@mail.gmail.com%3E

Hmm, it may be related but I can't really tell.

But I do notice that the excalibur-sourceresolve jar rev'ed from 1.1 to  
2.1 going from Cocoon 2.1.6 to 2.1.8...

—ml—


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


Re: Questions re: source resolving porting from 2.1.6 => 2.1.8

Posted by Antonio Fiol Bonnín <an...@gmail.com>.
2006/1/31, Mark Lundquist <ml...@wrinkledog.com>:
> Hi all,
>
> I have a bunch of Cocoon apps based on 2.1.6, and I'm actually just
> rev-ing the first of these up to 2.1.8.  So far so good, mostly... but
> I have two questions:
>
> 1) Sources appear to be resolved differently.  Some background: my root
> sitemap is not located directly within the webapp context directory,
> instead of "webapp/sitemap.xmap", I have
>
>         webapp/
>                 sitemap/
>                         main.xmap
>                         .
>                         . (other crap that included in main.xmap via XML entities)
>                         .
>
> All file paths in the sitemap, e.g. 'src' attribute on generators and
> transformers now resolve relative to the parent directory of the the
> sitemap document (viz., "webapp/sitemap/"), where they always used to
> resolve relative to the mount point of the sitemap (the webapp context
> in the case of the root sitemap, i.e. "webapp/").  To get my
> application working again, I had to change all these attributes to use
> the "context:" protocol, then all was well.
>
> So Question 1 is: is this how it's supposed to work now, or is this
> caused by some misconfiguration on my part, e.g. something I was
> supposed to have changed going from 2.1.6 to 2.1.8?
>
> 2) In a subsitemap area, I have some flowscript that invokes the
> SourceResolver on a file pathname, and then calls exists() on the
> result.  No matter what I try, I am not able to come up with a URL for
> the source that gets exists() to return true when I know that it should
> (i.e., the file _does_ exist!).  This _could_ be related to Question
> (1) above; however, it's not exactly the same thing, because in this
> sitemap, the sitemap.xmap file _is_ located directly within the
> subsitemap mount point.
>
> (1) was an annoyance, but not a big deal and there I'm really just
> curious about whether it's really supposed to work that way.  (2)
> however is a show-stopper for me —I really need to figure out what the
> problem is here!
>
> Any help much appreciated! :-)
> —ml—


Could you please post the relevant parts of your sitemap, subsitemap
and flowscript?

In particular, I am interested in seeing any map:mount in your sitemap(s).

We do use the resolver to resolve absolute pathnames with Cocoon
2.1.8, from subsitemaps, and from flowscript, and apparently, it works
with no problems. Linux environment.

I had a strange similar thing, consisting in cocoon:/ URLs not being
resolved properly on flowscript called by subsitemaps. This was on
2.1.7, but although we migrated our app from 2.1.5.1 to 2.1.7 and now
to 2.1.8, we had not called flowscript from the subsitemap with
2.1.5.1. So I don't know if it was a regression.

The problem I had is explained on:
http://mail-archives.apache.org/mod_mbox/cocoon-users/200508.mbox/%3Cb67708530508302339ba86d82@mail.gmail.com%3E



--
Antonio

Update Re: Questions re: source resolving porting from 2.1.6 => 2.1.8

Posted by Mark Lundquist <ml...@wrinkledog.com>.
Some more data...

I tried passing an absolute pathname to the source resolver, and 
exists() on the returned still Source returns false, even though the 
file _does_ exist.

I prepended "file:" to the pathname, and that made no difference.

Any ideas?
—ml—


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