You can use different different map:pipeline sections to:

(1) Allow each map:pipeline to define its own error handling va
map:handle-errors.  Example:

        <map:pipeline>
                <map:match pattern="foo">...</map:match>
                <map:handle-errors>
                        <!-- use one transform/serializer -->
                </map:handle-errors>
        </map:pipeline>
        <map:pipeline>
                <map:match pattern="bar">...</map:match>
                <map:handle-errors>
                        <!-- use another transform/serializer -->
                </map:handle-errors>
        </map:pipeline>

(2) Hide a map:pipeline from external target requests (e.g., web
browsers cannot request the "foo" target) by using the
internal-only="true" attribute/value.  Example:

        <map:pipeline internal-only="true">
                <map:match pattern="foo">...</map:match>
        </map:pipeline>
        <map:pipeline>
                <map:match pattern="bar">
                        <map:generate src="cocoon:/foo"/>
                        ...
                </map:match>
        </map:pipeline>

(3) Use a different map:pipeline type for some targets such as
type="profile-caching" to use caching and profiling.  Example:

        <!-- profiled targets -->
        <map:pipeline type="profile-caching">
                <map:match pattern="foo">...</map:match>
                <!-- more profiled targets -->
                ...
        </map:pipeline>
        <!-- non-profiled targets -->
        <map:pipeline>
                <map:match pattern="bar">...</map:match>
                <!-- don't profile the profile -->
                <map:match pattern="profile">
                        <map:generate type="profile"/>
                        <!-- we could use XSL to stylize here -->
                        <!-- but we will just show current raw profile results -->
                        <map:serialize type="xml"/>
                </map:match>
        </map:pipeline>

Requests for "foo" are shown in the profile.  Use the <map:generate
type="profile"/> generator in a pipeline target to 

(4) Any or all of the above in combination

An excellent discussion of pipelines can be found in Matthew and
Carsten's Coocon book by New Riders () on page 75.

Is this a good candidate for the Wiki?

Cheers!

-- jack

John R. Callahan, Ph.D.
CTO
Sphere Software Corporation - The Intelligence of XML
[EMAIL PROTECTED]

p.s. Your syntax on the map:match is incorrect below.

> 
> 
> On Thursday, October 31, 2002, at 02:59  PM, Steven Punte wrote:
> 
> > What the difference between
> >
> >   <map:pipeline>
> >     <map:match="foo">......</>
> >     <map:match="bar">......</>
> >   </>
> >
> > and
> >
> >   <map:pipeline>
> >     <map:match="foo">......</>
> >   </>
> >
> >   <map:pipeline>
> >     <map:match="bar">......</>
> >   </>
> 
> 
> Please see:
>    http://xml.apache.org/cocoon/faq/faq-sitemap.html#faq-9
> 
> Diana
> 
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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

Reply via email to