cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From footh <>
Subject Forcing error in sitemap
Date Fri, 11 Aug 2006 20:41:01 GMT
I have a sitemap that first goes through a javaflow,
then is forwarded to an aggregation of several
different pieces.

One of those pieces is the main content.  If a URL is
requested that doesn't exist, grabbing the main
content will cause a null error in the pipeline (but
since it "matches" a pipeline, a 404 error will not be

I need these instances to produce 404 error because
I'm getting killed by search engines that are
requesting URLs that don't exist anymore. They are not
getting 404 so they keep trying the URLs which causes
my log file to balloon in size.

So, anyway, I've figured out I should use the
"resource-exists" selector on the main content
aggregation part.  But, if the resource doesn't exist,
I want to force a 404 error so the "handle-errors"
block properly handles the error.  However, I can't
figure out how to generate an error that moves the
sitemap processing to the handle-errors block.  Here
is the pipeline snippet in question:

<map:match pattern="**-content">
  <map:select type="resource-exists">
    <map:when test="documents/{1}.xml">
      <map:generate type="jx"
      <map:serialize type="xml"/>
    <!-- force 404 error here!!! -->

So, in the "otherwise" block, I'd like to force a 404
error.  I'm hoping there is a really simple way to do
this.  Anyone have a suggestion?



Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message