Tim Williams wrote:
On 12/26/05, Torsten Stolpmann <[EMAIL PROTECTED]> wrote:

Hi,

while enabling a similar modification in the project sitemap I
consistently run into OutOfMemory exceptions. I am using forrest 0.7
with the war option.

As a crosscheck I copied an existing, unmodified forrest sitemap.xmap
into the documentation folder which gives me exactly the same results.


I would imagine that would lead to some strange results.  Since this
is where project sitemaps are mounted, it's probably just continuously
mounting itself.

Sounds reasonable.


When applying my intended changes to the forrest sitemap.xmap i am able
to achieve what i want. Any attempt to incorporate those changes in the
project sitemap fails with OutOfMemory Exceptions.

What am I doing wrong here? What parts of the original sitemap.xmap
would I need to implement in the project sitemap?

My current assumptions are:
<map:match pattern="*.html">...
<map:match pattern="**/*.html">...
And (out of necessity, cocoon would else complain about the missing
resource definition):
  <map:resources>
    <map:resource name="skinit">...


Have you tried using what Thorsten posted in the other thread and
changing cocoon:/ to cocoon://  ?  By using cocoon:// it should go all
the way back to the root sitemap looking for the match and not need
copying into the project sitemap.

I have to do some investigation to understand what you are suggesting here. I have tried exchanging cocoon:/ with cocoon:// but that gives me the same exception. Probably you meant something different here?

I wonder if you can send your attempt at the project sitemap and let
someone have a look?

Sure, you find it attached. It just contains the parts taken from the forrest sitemap.xmap I needed to modify (which i haven't done here to keep things simple). So this is the minimum broken example I could provide at the moment.


--tim

Thanks,

Torsten

<?xml version="1.0"?>
<!--
  Copyright 2002-2004 The Apache Software Foundation or its licensors,
  as applicable.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- ===============================================
Default Forrest sitemap, defining the whole site.
Delegates to the other *.xmap files.  See
http://forrest.apache.org/docs/sitemap-ref.html

$Revision: 1.6 $
==================================================== -->


<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0";>

  <map:resources>
    <map:resource name="skinit">
        <map:select type="exists">
          <map:when test="{project:skins-dir}{forrest:skin}/xslt/html/{type}.xsl">
            <map:transform src="{project:skins-dir}{forrest:skin}/xslt/html/{type}.xsl">
              <map:parameter name="notoc" value="{notoc}"/>
              <!-- For backwards-compat with 0.2 - 0.4 skins -->
              <map:parameter name="isfaq" value="{notoc}"/>
              <map:parameter name="nopdf" value="{nopdf}"/>
              <map:parameter name="path" value="{path}"/>
              <map:parameter name="config-file" value="{project:skinconf}"/>
            </map:transform>
          </map:when>
          <map:otherwise>
            <map:transform src="{forrest:context}/skins/{forrest:skin}/xslt/html/{type}.xsl">
              <map:parameter name="notoc" value="{notoc}"/>
              <!-- For backwards-compat with 0.2 - 0.4 skins -->
              <map:parameter name="isfaq" value="{notoc}"/>
              <map:parameter name="nopdf" value="{nopdf}"/>
              <map:parameter name="path" value="{path}"/>
              <map:parameter name="config-file" value="{project:skinconf}"/>
            </map:transform>
          </map:otherwise>
        </map:select>
        <map:select type="config">
          <map:parameter name="value" value="{defaults:i18n}"/>
          <map:when test="true">
            <map:transform type="i18n">
              <map:parameter name="locale" value="{request:locale}"/>
            </map:transform>
	  </map:when>
        </map:select>
      <!--
        FIXME: strip_namespace is because this bug: http://issues.apache.org/bugzilla/show_bug.cgi?id=35348
      -->
        <map:transform src="{forrest:context}/skins/common/xslt/html/strip_namespaces.xsl"/>

      <map:serialize/>
    </map:resource>

  </map:resources>

  <map:pipelines>
    <map:pipeline internal-only="false">
<!--pipeline that "marries" the docs in the root dir with the skin to produce html-->
      <map:match pattern="*.html">
        <map:aggregate element="site">
          <map:part src="cocoon:/skinconf.xml"/>
          <map:part src="cocoon:/build-info"/>
          <map:part src="cocoon:/tab-{0}"/>
          <map:part src="cocoon:/menu-{0}"/>
          <map:part src="cocoon:/body-{0}"/>
        </map:aggregate>

        <map:call resource="skinit">
          <map:parameter name="type" value="site2xhtml"/>
          <map:parameter name="path" value="{0}"/>
        </map:call>
      </map:match>
<!--pipeline that "marries" the docs in all other dirs then root with the skin to produce html-->
      <map:match pattern="**/*.html">
        <map:aggregate element="site">
          <map:part src="cocoon:/skinconf.xml"/>
          <map:part src="cocoon:/build-info"/>
          <map:part src="cocoon:/{1}/tab-{2}.html"/>
          <map:part src="cocoon:/{1}/menu-{2}.html"/>
          <map:part src="cocoon:/{1}/body-{2}.html"/>
        </map:aggregate>
        <map:call resource="skinit">
          <map:parameter name="type" value="site2xhtml"/>
          <map:parameter name="path" value="{0}"/>
        </map:call>
      </map:match>
    </map:pipeline>

  </map:pipelines>

</map:sitemap>