forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <>
Subject Re: Help with new templates
Date Tue, 02 Aug 2005 08:10:10 GMT
CFAS Webmaster wrote:
> Diwaker,
>  In responding to my own post, I've made some progress.  I've found the 
> correct xsl syntax to import a file and used that in the contract, 
> adjusting for the location of where forrest thinks it wants the file vs. 
> where it actually lives:
>            <xsl:template name="extra-info-body">
>              <xsl:for-each 
> select="document('../../../cfas-new/src/documentation/content/xdocs/extra.xml')">
>        <xsl:comment>+
>            |start extra-info
>            +</xsl:comment>
>               <xsl:copy-of select="document/*"/>
>        <xsl:comment>+
>            |end extra-info
>            +</xsl:comment>
>              </xsl:for-each>
>            </xsl:template>

You should be careful about using that document() function
hack. If you were running forrest as a live server, then
Cocoon would keep getting the old information from its
cache. So if your extra.xml is modified, then the changes
will have no effect.

Using Cocoon's sitemap with map:aggregate might work better.
Search in the forrest/main/webapp/*.xmap and in plugins
for some examples of aggregation. It is very powerful
once you grasp the concept.


View raw message