forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <>
Subject Re: multiple projects in single forrest instance
Date Fri, 14 Sep 2007 23:04:01 GMT
llamar burgess wrote:
> Ross Gardler schrieb:
>> For example, issue FOR-1044 [2] ("Navigation conversion is 
>> incomplete") is a pretty important one. To start understanding what 
>> the problem is here we need to understand the process by which 
>> site.xml gets turned into the HTML.
>> Searching in sitemap.xmap shows us this:
>> <!-- The navigation and links file "site.xml" -->
>>     <map:pipeline internal-only="true">
>>       <map:match pattern="site.navigation.links.xml">
>>         <map:select type="exists">
>>           <map:when test="{}">
>>             <map:generate src="{}"/>
>>           </map:when>
>>           <map:when test="{lm:site.xml}">
>>             <map:generate src="{lm:site.xml}"/>
>>           </map:when>
>>         </map:select>
>>         <map:transform type="xinclude"/>
>> <!-- FIXME: This is a workaround to Issue FOR-675 and 
>> commons-jxpath-1.2 -->
>>         <map:transform src="{lm:transform.xml.xml-namespace-stripped}"/>
>> <!-- end FIXME: FOR-675 -->
>>         <map:serialize type="xml"/>
>>       </map:match>
>>     </map:pipeline>
> re,
> i guess the problem here is to determine if the site.xml of the master 
> or a subsite (and if - then which) should be used. The snippet above 
> will always return the site.xml of the master project.

Well, the above is the default match for the site.xml in the root 
project for the current instance of Forrest. In the case of multiple 
sites this will always be the master site.xml.

If you take a look at http://localhost:8888/index.html#Navigation (in 
the whiteboard/multipleSites/master you will see:

--- start quoted text ---

Navigation is controlled by the main Forrest project. There are two 
aspects to navigation site.xml and tab.xml.

To include a site.xml file from a contained content object simply add 
something like the following to your master site.xml:

   <subsite1 label="First Subsite" tab="home" href="seed/">
     <xi:include href="cocoon://seed/site.xml"/>

   <xi:include href="cocoon://seed/site.xml"/>

--- end quoted text ---

> One thing i am not quite clear about is the line
> <map:transform type="xinclude"/>
> there are no xincludes in the site.xml.. is this just a precaution?

As David said elsewhere, it is so that projects can use xinclude in 
their site.xml files. As you can see in the above quoted text that is 
exactly what we are doing in the master site.xml file. The result is 
that the subsite site.xml files are imported into the master site.xml.

I hope that helps you understand the processing. Of course I appreciate 
you are only just beginning to climb up the learning curve of how 
Forrest works. You will find that once you understand how the basic 
processed work, like this one, figuring out the rest is pretty easy.


View raw message