cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Johnston" <coc...@lojjic.net>
Subject Re: Cocoon Matching Problem
Date Wed, 08 Feb 2006 21:38:40 GMT
> Hi:
>
> We (my project group) are having a problem at work with the code
> reproduced
> below.  The first section of code is the pipeline portion of the Cocoon
> sitemap we are running.  The idea is that any URL requested by the user
> will
> be passed down by all of the pipelines with specific matches and match on
> the Frameset pipeline that will match on anything.  This Frameset pipeline
> will generate the frameset for the site using the XSL stylesheet in the
> second section of code.  The frameset generates requests for three
> additional URLs for the search Bar, Nav Bar, and Main Text Area.  The
> Search
> Bar and Navigation Bar URLs will match on specific pipelines, while the
> Main
> Text are URL will match on various pipelines depending on the exact URL.
> All of this works for the URL "policy.bltmc.edu", but for URLs with a "
> policy.bltmc.edu/*" format, we experience the following problem.
>
> When we request URLs with the "policy.bltmc.edu/*" format the Frameset
> pipeline works fine, it generates the frameset and sends the correct
> requests for the search Bar, Nav Bar, and Main Text Area.  The Search Bar
> and Navigation Bar pipelines work fine and generate those portions of the
> page.  The request for the Main Text Area fails to match on the  "
> policy.bltmc.edu/*/Main_Text_Area" pipeline, however.  As a result the
> request is passed down and matches on the Frameset pipeline.  This leads
> to
> a loop in which the Search and Navigation Bars are inserted repeatedly.
>
>
> What is really odd is that while the "policy.bltmc.edu/*/Main_Text_Area"
> request generated by the frameset---in response to a "
> policy.bltmc.edu/*/Main_Text_Area" request---will not work, if we directly
> request a URL in the "policy.bltmc.edu/*/Main_Text_Area" format, the
> pipeline that is supposed to match on that format works and generates the
> page.  We have checked the Main Text Area URL generated by the Framest,
> however, and it is correct.
>
> Three of us have been trying to figure this out for the past week and we
> just cannot figure it.  Any help would be much appreciated.
>
<snip/>

My guess is this has something to do with relative URLs in your src=""
attributes.  The web browser will resolve them relative to the current
document's base URL.  So if your frameset is requested by the URL:

 http://domain.com/policy.bltmc.edu/mypage

and that frameset's XSLT produces:

 <frame src="policy.bltmc.edu/mypage/Main_Text_Area">

then your browser will request this URL for that frame's contents:

 http://domain.com/policy.bltmc.edu/policy.bltmc.edu/mypage/Main_Text_Area

...which would not be matched by either of your Main_Text_Area pipelines. 
The search/navigation bar pipelines are matching because you use "**".  To
fix it either make your Main_Text_Area matcher more generic, or begin your
src attributes with a "/" to make it resolve relative to the domain root.

Hopefully this is the right guess.  You'd be able to verify it by looking
in your access logs.

Regards,
--Jason




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


Mime
View raw message