Do you need multiple sitemaps?
Given the brief description, it sounds like you just need your source organized...

\content
  +  \common
  +  \customer-specific1
  +  \customer-specific2
  +  \etc

One option is to catch the resource not found and have a specific pipeline for that.
We did that for a site we're migrating.  We look for an XML file first, and if we 
can't find it, then we check to see if there is an (older) matching HTML.
It could be a bit wasteful depending on how much customization you have, but if it's 
skewed to mostly common or mostly customized you could try looking for the common 
stuff first and then go to the uncommon if you get the exception.

Sitemap excerpts for "not found" exception.

  <map:selectors default="browser">
    <map:selector name="exception" src="org.apache.cocoon.selection.ExceptionSelector">
      <exception name="not-found" class="org.apache.cocoon.ResourceNotFoundException"/>
    </map:selector>
  </map:selectors>

  <map:pipelines>
     <map:pipeline>

        <!-- General pattern for most everything else -->
        <map:match pattern="*-*">
          <map:generate src="content/xml/{1}-{2}.xml"/> 
          <map:serialize/>
        </map:match>

        <!-- If we couldn't find an XML file, check for an HTML file of the same name 
-->
        <map:handle-errors>
          <map:select type="exception">
            <map:when test="not-found">
              <map:read mime-type="html" src="content/html/{request:sitemapURI}.html"/>
              <map:serialize/>
            </map:when>
          </map:select>
        </map:handle-errors>

      </map:pipeline>
      </map:pipelines>


> -----Original Message-----
> From: Tim Olson [SMTP:[EMAIL PROTECTED]
> Sent: Tuesday, August 26, 2003 12:58 PM
> To:   '[EMAIL PROTECTED]'
> Subject:      two subsitemaps
> 
> it seems that trying to mount more than one sitemap per request only mounts the 
> first one.  in the following example:
>  
>     <map:match pattern="*/*/*"> <!-- domain/page/action -->
> 
>       <!-- mount root sitemap -->
>       <map:mount check-reload="yes" src="c:/mag/xsl/root.xmap" uri-prefix=""/>
>       <!-- mount domain-specific sitemap -->
>       <map:mount check-reload="yes" src="c:/mag/xsl/{1}/{2}.xmap" 
> uri-prefix="{1}/{2}"/>
>  
>       <map:aggregate element="data">
>         <!-- <map:part src="configuration.xml"/> -->
>         <map:part src="cocoon://{1}/{2}/{3}"/>
>       </map:aggregate>
>       <map:call resource="respond"/>
> 
>     </map:match>
>  
> the request works if the pattern is matched by the 1st sitemap (root.xmap) but 
> "Resource Not Found" is given for all URLs handled by the second sitemap.  some 
> pages are the same for all our clients and should be handled in the root.xmap but 
> some pages are customized per domain.  any ideas how to pull this off?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to