cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject RE: global sitemap variables bug.
Date Fri, 04 Apr 2003 12:15:29 GMT
Which version of Cocoon do you use?

Carsten

> -----Original Message-----
> From: Leszek Gawron [mailto:ouzo@vip.net.pl]
> Sent: Tuesday, April 01, 2003 4:59 PM
> To: cocoon-dev@xml.apache.org
> Subject: global sitemap variables bug.
>
>
> What I found may be a bug in {global:XXX} input module
> First the sitemap then the explanation:
> <map:component-configurations>
>     <global-variables>
>         <baseURL>myapp01</baseURL>
>     </global-variables>
> </map:component-configurations>
> <map:pipeline type="noncaching">
>     <map:match pattern="stylesheets/*">
>         <map:generate src="stylesheets/{1}"/>
>         <map:serialize/>
>     </map:match>
>     <map:match pattern="picker/**">
>         <map:mount check-reload="yes" reload-method="synchron"
> src="picker/" uri-prefix="picker"/>
>     </map:match>
> </map:pipeline>
>
> A part of sub sub sitemap that matches "picker/**" looks like this:
> <map:pipeline type="noncaching">
>     <map:match pattern="form/*">
>         <map:generate src="data/{1}/form.xml"/>
>         <map:transform
> src="cocoon://{global:baseURL}/stylesheets/reportform2html.xsl">
>             <map:parameter name="baseURL" value="/{global:baseURL}"/>
>         </map:transform>
>         <map:transform type="simpleform"/>
>         <map:serialize/>
>     </map:match>
>     <map:match pattern="data/*/*/*">
>         <map:generate type="serverpages" src="data/{1}/content.xsp"/>
>         <map:transform src="stylesheets/picker-table.xsl">
>             <map:parameter name="baseURL" value="/{global:baseURL}"/>
>             <map:parameter name="formname" value="{2}"/>
>             <map:parameter name="fieldname" value="{3}"/>
>         </map:transform>
>         <map:serialize/>
>     </map:match>
>     <map:match pattern="content/*/*/*">
>         <map:select type="request-parameter">
>             <map:parameter name="parameter-name" value="visited"/>
>             <map:when test="1">
>                 <map:act type="form-validator">
>                     <map:parameter name="descriptor"
> value="data/{1}/form-descriptor.xml"/>
>                     <map:parameter name="validate-set" value="main"/>
>                     <map:aggregate element="content">
>                         <map:part src="cocoon:/form/{../1}"
> strip-root="true"/>
>                         <map:part
> src="cocoon:/data/{../1}/{../2}/{../3}"/>
>                     </map:aggregate>
>                     <map:serialize/>
>                 </map:act>
>             </map:when>
>         </map:select>
>         <map:aggregate element="content">
>             <map:part src="cocoon:/form/{1}"/>
>         </map:aggregate>
>         <map:serialize/>
>     </map:match>
>     <!--+
>          | 1 - picker source
>          | 2 - form name
>          | 3 - field name
>          +-->
>     <map:match pattern="*/*/*">
>         <map:aggregate element="root">
>             <map:part src="cocoon://content/{1}/{2}/{3}"/>
>         </map:aggregate>
>         <map:transform
> src="cocoon://{global:baseURL}/stylesheets/site2html.xsl">
>             <map:parameter name="baseURL" value="/{global:baseURL}"/>
>         </map:transform>
>         <map:serialize type="html"/>
>     </map:match>
> </map:pipeline>
> </map:pipelines>
>
>
> Shortly:
> The default view (<map:match pattern="*/*/*">) is being constructed of :
> 1. the form displayed on top of the page
> 2. results from database (filtered with data entered in form) if
> form has been
> submitted
>
> My cocoon serves a lot of subsitemaps (serveral web applications
> in one web
> application). Sometimes several versions of the same application
> exist in the
> same cocoon space so I needed the way to distinguish between them.
> The "main subsitemap" contains global variable definition named
> baseURL that I
> add to all links. What's wrong then?
>
> If you request
> http://localhost:8080/myapp01/picker/form/pickername - this part
> of the page
> gets properly rendered but if you request:
> http://localhost:8080/myapp01/content/pickername/formname/fieldname
>
> you get an error:
> Unable to get transformer handler for
> cocoon:///stylesheets/reportform2html.xsl
>
> which leads us to this line of code:
> <map:generate src="data/{1}/form.xml"/>
> <map:transform
> src="cocoon://{global:baseURL}/stylesheets/reportform2html.xsl">
>     <map:parameter name="baseURL" value="/{global:baseURL}"/>
> </map:transform>
>
> When requesting "form/pickername"
> "cocoon://{global:baseURL}/stylesheets/reportform2html.xsl" gets
> resolved to :
> "cocoon://myapp01/stylesheets/reportform2html.xsl" but it does not resolve
> when "content/pickername/formname/fieldname" gets requested.
>
> Is it a bug ?
> 	ouzo
>
>
> --
>             __
>          | /  \ |        Leszek Gawron            //  \\
>         \_\\  //_/      ouzo@vip.net.pl          _\\()//_
>          .'/()\'.     Phone: +48(600)341118     / //  \\ \
>           \\  //  recursive: adj; see recursive  | \__/ |
>
>


Mime
View raw message