Amir Rosen wrote:
> 
> > -----Original Message-----
> > From: Stefano Mazzocchi [mailto:[EMAIL PROTECTED]]
> 
> >  - deprecate 'internal-only' attribute of 'map:pipeline'
> >    [because named pipelines become implicitly internal-only]
> 
> How can i reproduce the functionality of the given example without the 
>'internal-only'
> declaration ?

Let's see.

> The first pipeline is a cacheable pipeline that generates an XSLT stylesheets, used
> internally by other pipelines.
> 
>         <pipeline internal-only="true">
>          <match "generatedXSL/*">
>           ...
>          </match>
>         </pipeline>
> 
>         <pipeline>
>          <match "*">
>           ...
>           <transform src="cocoon:/generatedXSL/{...}"/>
>           ...
>          </match>
>         </pipeline>

Hmmm, good point.

One possible way of achieving this would be like this:

 <pipeline name="generatedXSLT">
  <match pattern="**">
   <generate src="{src}"/>
   ...
   <serialize ../>
  </match>
 </pipeline>

 <pipeline>
  <match pattern="**">
   ...
   <transform src="pipeline://generatedXSLT/{1}"/>
   ...
  </match>
 </pipeline>

It requires a different protocol that is composed like this

 pipeline://[named pipeline]/[path]

and the named pipeline is called with the path stripped (so that further
matching/selection and so on can be performed transparently).

Named pipelines are implicitly internal because they aren't connected to
the outside world.

Unnamed pipelines, on the other hand, are connected directly to the
Cocoon URI space.

Note that cocoon blocks might have sitemaps with named pipelines only,
so they don't expose their own URI space to Cocoon, but only internally,
to the other Cocoon Blocks.

In that case, the syntax might become something like this

[xslt-generating block prefixed with 'generateXSLT']

 <pipeline name="main">
  <match pattern="**">
   <generate src="{src}"/>
   ...
   <serialize ../>
  </match>
 </pipeline>

[your pipeline that uses that service]

 <pipeline>
  <match pattern="**">
   ...
   <transform src="pipeline://generatedXSLT:main/{1}"/>
   ...
  </match>
 </pipeline>

where the protocol now becomes

  pipeline://[block prefix]:[named pipeline]/[path]

in case of a normal pipeline call that might become

 <match pattern="*">
  <call block="generatedXSLT" pipeline="main">
   <parameter name="src" value="{1}"/>
  </call>
 </match>

where, if no '@block' attribute is specified, it falls back to the same
block (thus the same sitemap and all the parents [named pipelines should
be inherited by subsitemaps])

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<[EMAIL PROTECTED]>                             Friedrich Nietzsche
--------------------------------------------------------------------


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

Reply via email to