cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathaniel Alfred" <Alfred.Nathan...@swx.com>
Subject RE: mount - ish question
Date Wed, 27 Apr 2005 06:22:31 GMT
> -----Original Message-----
> From: Chris Maloney [mailto:cocoon@chrismaloney.com]
> Sent: Mittwoch, 27. April 2005 03:15
> To: users@cocoon.apache.org
> Subject: map:mount - ish question
> 

> I'm setting up a web site that consists of two main directories:
>   Main - contains my sitemap and all my main XML content
>   Other - heritage image of a bunch of source code
> 
> I want to keep these separate, because the "Other" directory is under
> its own CM system (SourceSafe, blech).
> 
> I'd like to serve the content from "Other", though, from URLs like
> http://host/Other/...., where "...." could be just about any type
> of file.
> 
...
> 
> My question is, is there an easy way to do this across the board,
> without having to rewrite every straight-thru pipeline?  I'd like
> something like this in the front:
> 
>   <map:match pattern='Other/**'>
>     <!-- reset the 'src' base directory to '../Other', and continue
>          matching  -->
>   </map:match>
> 
> Any help would be fantastically appreciated.  BTW, I have really
> looked for this answer in the two books I have and in the online
> docs.
> 
> Thanks,
> Chris

No, there is not <map:chdir>.  The only way to change the src base is <map:mount>
to a different sitemap.

But if the large amount of pipelines bothering you is mainly map:read with different mime-types,
you should rather look at your servlet containers configuration.  In Tomcat, for example,
you define standard mappings in web.xml:

  <mime-mapping>
    <extension>png</extension>
    <mime-type>image/png</mime-type>
  </mime-mapping>

Then maybe a lot of trivial pipeline can be replaced by a catch-all at the end:

  <map:match pattern='**.*'>
    <map:select type='resource-exists'>
      <map:when test='{1}.{2}'>
        <map:read src="{1}.{2}"/>
      </map:when>
      <map:otherwise>
        <map:read src="../Other/{1}.{2}"/>
      </map:otherwise>
    </map:select>
  </map:match>

HTH, Alfred.
 
 
This message is for the named person's use only. It may contain confidential, proprietary
or legally privileged information. No confidentiality or privilege is waived or lost by any
mistransmission. If you receive this message in error, please notify the sender urgently and
then immediately delete the message and any copies of it from your system. Please also immediately
destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail communications through their
networks. Any views expressed in this message are those of the individual sender, except where
the message states otherwise and the sender is authorised to state them to be the views of
the sender's company.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message