forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cyriaque Dupoirieux <Cyriaque.Dupoiri...@pcotech.fr>
Subject Re: [Forrest bar] structurer problems
Date Wed, 22 Feb 2006 13:34:04 GMT
Thorsten Scherler a écrit :
> El mié, 22-02-2006 a las 13:31 +0100, Thorsten Scherler escribió:
>   
>> El mié, 22-02-2006 a las 13:21 +0100, Cyriaque Dupoirieux escribió:
>>     
>>> Cyriaque Dupoirieux a écrit :
>>>       
>>>> Cyriaque Dupoirieux a écrit :
>>>>         
>>>>> Hi,
>>>>>
>>>>>    The link to structurer and structurer-xsl do not work anymore with

>>>>> the dispatcher.
>>>>>    The url was something like :
>>>>>
>>>>>    * cocoon://prepare.contract.html.content-main for a contract or
>>>>>    * cocoon://prepare.structurer.html.<yourPage>
>>>>>
>>>>> What is the new url to use ?
>>>>>           
>>>> Ok, I think I have found, it's
>>>>   * cocoon://resolve.contract.html.content-main for a contract or
>>>>   * cocoon://resolve.structurer.html.<yourPage>
>>>>
>>>> Is that good ?
>>>>         
>>> No it is not !
>>> The previous version (the structurer and not the dispatcher) has the 
>>> following pipe :
>>>     <!-- prepare the xsl:templates of the requested contract.
>>>       {1} format to deliver
>>>       {2} contract name  -->
>>>     <map:pipeline>
>>>       <map:match pattern="prepare.contract.*.**">
>>>         <map:generate src="{lm:resolve.contract.{1}.{2}}" />
>>>         <map:transform src="{lm:contract-strip-xsl.xsl}">
>>>           <map:parameter name="format" value="{1}" />
>>>         </map:transform>
>>>         <map:transform type="i18n">
>>>           <map:parameter name="locale" value="{request:locale}" />
>>>         </map:transform>
>>>         <map:serialize />
>>>       </map:match>
>>>     </map:pipeline>
>>>
>>> Which returned the stylesheet corresponding to the contract.
>>> It used this fonctionality to import contracts :
>>>       <xsl:include href="cocoon://prepare.contract.html.content-main"/>
>>>
>>> I think it was nice to be able to do this,
>>>
>>> WDYT ?
>>>
>>>       
>> Jeje, the xsl-magic is gone with standalone contracts. ;-) We do not
>> generate an aggregated xsl anymore. 
>>
>> We resolve the structurer, then the dispatcher invokes the standalone
>> transformation of the contracts. See page 17 of 
>> http://svn.apache.org/viewcvs.cgi/*checkout*/forrest/events/malaga_2006/forrest-dispatcher-1.5h_en.pdf
>>
>> but:
>>     
>>> Ok, I think I have found, it's
>>>       
>>>>   * cocoon://resolve.contract.html.content-main for a contract or
>>>>   * cocoon://resolve.structurer.html.<yourPage>
>>>>         
>> sounds sweet.
>>     
>
>
> I just understood what you suggest (at least I think now), you want to
> add:
>   
>>     <!-- prepare the xsl:templates of the requested contract.
>>     
>>>       {1} format to deliver
>>>       {2} contract name  -->
>>>     <map:pipeline>
>>>       <map:match pattern="prepare.contract.*.**">
>>>         <map:generate src="{lm:resolve.contract.{1}.{2}}" />
>>>         <map:transform src="{lm:contract-strip-xsl.xsl}">
>>>           <map:parameter name="format" value="{1}" />
>>>         </map:transform>
>>>         <map:transform type="i18n">
>>>           <map:parameter name="locale" value="{request:locale}" />
>>>         </map:transform>
>>>         <map:serialize />
>>>       </map:match>
>>>     </map:pipeline>
>>>       
>
> again to the internal.xmap.
>
> +1
>   
Yes that's it !
Now I have two problems :

    * Is there still a format in our contracts or do I remove the
      <map:parameter name="format" value="{1}" /> ?

    * I don't know much about lm use,

          o I add the pipeline to internal.xmap and the following lines :
    * <!--  Extracts the style sheet from the contract.  -->
          <match pattern="contract-strip-xsl.xsl">
            <select type="exists">
              <!-- don't think it's wise to let project override this... -->
              <!-- location
      src="{project:structurer}/resources/stylesheets/helper/contract-strip-xsl.xsl"
      /-->
              <location
      src="{defaults:structurer}/resources/stylesheets/helper/contract-strip-xsl.xsl"
      />
            </select>
          </match>
          o at the end of the location map.
          o And I copied the contract-strip-xsl.xsl in the
            dispatcher/resources/stylesheets/helper directory.
    * But it does not work !

Can you help ?
Cyriaque,

> salu2
>   

Mime
View raw message