You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Morrison, John" <Jo...@uk.experian.com> on 2001/06/22 18:09:45 UTC

Agregating serverpages...?

Could anybody please tell me if the following is possible/correct...?

   <map:match pattern="myscript.sh">
    <map:aggregate element="page">
     <map:part src="catalog" element="public"/>
     <map:part src="parameters" element="parameters"/>
    </map:aggregate>
    <map:serialize/>
   </map:match>

   <map:match pattern="parameters">
    <map:generate type="serverpages" src="docs/parameters.xml"/>
   </map:match>
  
   <map:match patter="catalog">
    <map:generate src="docs/experiancatalog.xml"/>
   </map:match>

'cause it keeps going wrong with the following details...

DEBUG   99322   [cocoon  ] (Thread-8): The sitemap has been successfully
compiled!
DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Changing Cocoon
context(sitemap.xmap) to prefix()
DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): 	from
context(file:/D:/Wrkfile/Repositories/work/test/) and prefix()
DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): 	at URI myscript.sh
DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): New context is
file:/D:/Wrkfile/Repositories/work/test/
DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Retrieving a
org.apache.cocoon.components.pipeline.CachingEventPipeline from the pool
DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Retrieving a
org.apache.cocoon.components.pipeline.CachingStreamPipeline from the pool
DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Matched
wildcardmatcher_wildcard_NBB
DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Component
generator:!content-aggregator!( emptyParam  )
DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Retrieving a
org.apache.cocoon.sitemap.ContentAggregator from the pool
DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): ContentAggregator: root
element='page' ns='' prefix=''
DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): ContentAggregator: part
uri='catalog' element='public' ns='' stripRootElement='' prefix=''
DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): ContentAggregator: part
uri='parameters' element='parameters' ns='' stripRootElement='' prefix=''
DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Component
serializer:xml( emptyParam  )
DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Retrieving a
org.apache.cocoon.serialization.XMLSerializer from the pool
DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): ContentAggregator:
collecting internal resource catalog
DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Retrieving a
org.apache.cocoon.components.pipeline.CachingEventPipeline from the pool
DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Retrieving a
org.apache.cocoon.components.pipeline.CachingStreamPipeline from the pool
DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): processing internal
sitemap request
DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Matched
wildcardmatcher_wildcard_NF5
DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Component
generator:file( emptyParam  )
DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Source=docs/catalog.xml
DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Retrieving a
org.apache.cocoon.generation.FileGenerator from the pool
DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Matched
wildcardmatcher_wildcard_NFC
DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Component
generator:file( emptyParam  )
DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Source=docs/catalog.xml
WARN    99322   [cocoon  ] (HttpProcessor[8080][4]): Error, try to process
the error page
org.apache.cocoon.ProcessingException: Generator already set. You can only
select one Generator (file)
	at
org.apache.cocoon.components.pipeline.AbstractEventPipeline.setGenerator(Abs
tractEventPipeline.java:89)
	at
org.apache.cocoon.components.pipeline.CachingEventPipeline.setGenerator(Cach
ingEventPipeline.java:86)
	at
org.apache.cocoon.www.sitemap_xmap.wildcardMatchNFC(sitemap_xmap.java:1083)


=======================================================================
Information in this email and any attachments are confidential, and may
not be copied or used by anyone other than the addressee, nor disclosed
to any third party without our permission.  There is no intention to
create any legally binding contract or other commitment through the use
of this email.

Experian Limited (registration number 653331).  
Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF

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


Re: Agregating serverpages...?

Posted by Sergio Carvalho <se...@acm.org>.
I think you must serialize the results of the parts. Thats how samples use aggregation...

On Fri, 22 Jun 2001 17:09:45 +0100
"Morrison, John" <Jo...@uk.experian.com> wrote:

> Could anybody please tell me if the following is possible/correct...?
> 
>    <map:match pattern="myscript.sh">
>     <map:aggregate element="page">
>      <map:part src="catalog" element="public"/>
>      <map:part src="parameters" element="parameters"/>
>     </map:aggregate>
>     <map:serialize/>
>    </map:match>
> 
>    <map:match pattern="parameters">
>     <map:generate type="serverpages" src="docs/parameters.xml"/>
>    </map:match>
>   
>    <map:match patter="catalog">
>     <map:generate src="docs/experiancatalog.xml"/>
>    </map:match>
> 
> 'cause it keeps going wrong with the following details...
> 
> DEBUG   99322   [cocoon  ] (Thread-8): The sitemap has been successfully
> compiled!
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Changing Cocoon
> context(sitemap.xmap) to prefix()
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): 	from
> context(file:/D:/Wrkfile/Repositories/work/test/) and prefix()
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): 	at URI myscript.sh
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): New context is
> file:/D:/Wrkfile/Repositories/work/test/
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Retrieving a
> org.apache.cocoon.components.pipeline.CachingEventPipeline from the pool
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Retrieving a
> org.apache.cocoon.components.pipeline.CachingStreamPipeline from the pool
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Matched
> wildcardmatcher_wildcard_NBB
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Component
> generator:!content-aggregator!( emptyParam  )
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Retrieving a
> org.apache.cocoon.sitemap.ContentAggregator from the pool
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): ContentAggregator: root
> element='page' ns='' prefix=''
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): ContentAggregator: part
> uri='catalog' element='public' ns='' stripRootElement='' prefix=''
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): ContentAggregator: part
> uri='parameters' element='parameters' ns='' stripRootElement='' prefix=''
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Component
> serializer:xml( emptyParam  )
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Retrieving a
> org.apache.cocoon.serialization.XMLSerializer from the pool
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): ContentAggregator:
> collecting internal resource catalog
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Retrieving a
> org.apache.cocoon.components.pipeline.CachingEventPipeline from the pool
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Retrieving a
> org.apache.cocoon.components.pipeline.CachingStreamPipeline from the pool
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): processing internal
> sitemap request
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Matched
> wildcardmatcher_wildcard_NF5
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Component
> generator:file( emptyParam  )
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Source=docs/catalog.xml
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Retrieving a
> org.apache.cocoon.generation.FileGenerator from the pool
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Matched
> wildcardmatcher_wildcard_NFC
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Component
> generator:file( emptyParam  )
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Source=docs/catalog.xml
> WARN    99322   [cocoon  ] (HttpProcessor[8080][4]): Error, try to process
> the error page
> org.apache.cocoon.ProcessingException: Generator already set. You can only
> select one Generator (file)
> 	at
> org.apache.cocoon.components.pipeline.AbstractEventPipeline.setGenerator(Abs
> tractEventPipeline.java:89)
> 	at
> org.apache.cocoon.components.pipeline.CachingEventPipeline.setGenerator(Cach
> ingEventPipeline.java:86)
> 	at
> org.apache.cocoon.www.sitemap_xmap.wildcardMatchNFC(sitemap_xmap.java:1083)
> 
> 
> =======================================================================
> Information in this email and any attachments are confidential, and may
> not be copied or used by anyone other than the addressee, nor disclosed
> to any third party without our permission.  There is no intention to
> create any legally binding contract or other commitment through the use
> of this email.
> 
> Experian Limited (registration number 653331).  
> Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 
> 

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


RE: Agregating serverpages...?

Posted by giacomo <gi...@apache.org>.
On Sun, 24 Jun 2001, John Morrison wrote:

>
>
> > -----Original Message-----
> > From: Mariano Kamp [mailto:mkamp@codamax.com]
> > Sent: Sunday, 24 June 2001 8:57 am
> > To: cocoon-dev@xml.apache.org
> > Subject: Re: Agregating serverpages...?
> >
> >
> > On Friday 22 June 2001 08:55 pm, Giacomo wrote:
> > > On Fri, 22 Jun 2001, Morrison, John wrote:
> > > > Could anybody please tell me if the following is possible/correct...?
> > > >
> > > >    <map:match pattern="myscript.sh">
> > > >     <map:aggregate element="page">
> > > >      <map:part src="catalog" element="public"/>
> > > >      <map:part src="parameters" element="parameters"/>
> > > >     </map:aggregate>
> > > >     <map:serialize/>
> > > >    </map:match>
> > > >
> > > >    <map:match pattern="parameters">
> > > >     <map:generate type="serverpages" src="docs/parameters.xml"/>
> > > >    </map:match>
> > > >
> > > >    <map:match patter="catalog">
> > > >     <map:generate src="docs/experiancatalog.xml"/>
> > > >    </map:match>
> > >
> > > Unfortunately the sitemap cannot know where the sitemap component
> > > selection process would end. It's not enought to close the match
> > > element. You need to specify a serializer to signal end-of-pipeline to
> > > the sitemap. So your example should work if you write it like this:
> > >
> > >     <map:match pattern="myscript.sh">
> > >      <map:aggregate element="page">
> > >       <map:part src="catalog" element="public"/>
> > >       <map:part src="parameters" element="parameters"/>
> > >      </map:aggregate>
> > >      <map:serialize/>
> > >     </map:match>
> > >
> > >     <map:match pattern="parameters">
> > >      <map:generate type="serverpages" src="docs/parameters.xml"/>
> > >      <map:serialize/>
> > >     </map:match>
> > >
> > >     <map:match patter="catalog">
> > >      <map:generate src="docs/experiancatalog.xml"/>
> > >      <map:serialize/>
> > >     </map:match>
> >
> >   I am just curious about how to use cocoon. Doing it with the default
> > serializer would mean to convert sax events to xml and in the
> > aggregation it
> > will be  transformed back to sax events?
>
> In short - I don't know cocoon well enough to comment.  I should point out
> though that the default serializer for the demo webapp is html, the default
> serializer for the above code is xml.

No, the ContentAggregator uses the EventPipelines directly. There is no
serializing/deserializing.

Giacomo


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


RE: Agregating serverpages...?

Posted by John Morrison <jo...@ntlworld.com>.

> -----Original Message-----
> From: Mariano Kamp [mailto:mkamp@codamax.com]
> Sent: Sunday, 24 June 2001 8:57 am
> To: cocoon-dev@xml.apache.org
> Subject: Re: Agregating serverpages...?
>
>
> On Friday 22 June 2001 08:55 pm, Giacomo wrote:
> > On Fri, 22 Jun 2001, Morrison, John wrote:
> > > Could anybody please tell me if the following is possible/correct...?
> > >
> > >    <map:match pattern="myscript.sh">
> > >     <map:aggregate element="page">
> > >      <map:part src="catalog" element="public"/>
> > >      <map:part src="parameters" element="parameters"/>
> > >     </map:aggregate>
> > >     <map:serialize/>
> > >    </map:match>
> > >
> > >    <map:match pattern="parameters">
> > >     <map:generate type="serverpages" src="docs/parameters.xml"/>
> > >    </map:match>
> > >
> > >    <map:match patter="catalog">
> > >     <map:generate src="docs/experiancatalog.xml"/>
> > >    </map:match>
> >
> > Unfortunately the sitemap cannot know where the sitemap component
> > selection process would end. It's not enought to close the match
> > element. You need to specify a serializer to signal end-of-pipeline to
> > the sitemap. So your example should work if you write it like this:
> >
> >     <map:match pattern="myscript.sh">
> >      <map:aggregate element="page">
> >       <map:part src="catalog" element="public"/>
> >       <map:part src="parameters" element="parameters"/>
> >      </map:aggregate>
> >      <map:serialize/>
> >     </map:match>
> >
> >     <map:match pattern="parameters">
> >      <map:generate type="serverpages" src="docs/parameters.xml"/>
> >      <map:serialize/>
> >     </map:match>
> >
> >     <map:match patter="catalog">
> >      <map:generate src="docs/experiancatalog.xml"/>
> >      <map:serialize/>
> >     </map:match>
>
>   I am just curious about how to use cocoon. Doing it with the default
> serializer would mean to convert sax events to xml and in the
> aggregation it
> will be  transformed back to sax events?

In short - I don't know cocoon well enough to comment.  I should point out
though that the default serializer for the demo webapp is html, the default
serializer for the above code is xml.

>  If this is the case, doesn't this add a performance penalty?
>
> Mariano
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>


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


Re: Agregating serverpages...?

Posted by Mariano Kamp <mk...@codamax.com>.
On Friday 22 June 2001 08:55 pm, Giacomo wrote:
> On Fri, 22 Jun 2001, Morrison, John wrote:
> > Could anybody please tell me if the following is possible/correct...?
> >
> >    <map:match pattern="myscript.sh">
> >     <map:aggregate element="page">
> >      <map:part src="catalog" element="public"/>
> >      <map:part src="parameters" element="parameters"/>
> >     </map:aggregate>
> >     <map:serialize/>
> >    </map:match>
> >
> >    <map:match pattern="parameters">
> >     <map:generate type="serverpages" src="docs/parameters.xml"/>
> >    </map:match>
> >
> >    <map:match patter="catalog">
> >     <map:generate src="docs/experiancatalog.xml"/>
> >    </map:match>
>
> Unfortunately the sitemap cannot know where the sitemap component
> selection process would end. It's not enought to close the match
> element. You need to specify a serializer to signal end-of-pipeline to
> the sitemap. So your example should work if you write it like this:
>
>     <map:match pattern="myscript.sh">
>      <map:aggregate element="page">
>       <map:part src="catalog" element="public"/>
>       <map:part src="parameters" element="parameters"/>
>      </map:aggregate>
>      <map:serialize/>
>     </map:match>
>
>     <map:match pattern="parameters">
>      <map:generate type="serverpages" src="docs/parameters.xml"/>
>      <map:serialize/>
>     </map:match>
>
>     <map:match patter="catalog">
>      <map:generate src="docs/experiancatalog.xml"/>
>      <map:serialize/>
>     </map:match>

  I am just curious about how to use cocoon. Doing it with the default 
serializer would mean to convert sax events to xml and in the aggregation it 
will be  transformed back to sax events?

 If this is the case, doesn't this add a performance penalty?

Mariano





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


RE: Agregating serverpages...?

Posted by John Morrison <jo...@ntlworld.com>.
Ah! The light dawns!  Thanks Giacomo, will do.

> -----Original Message-----
> From: giacomo [mailto:giacomo@apache.org]
> Sent: Friday, 22 June 2001 10:32 pm
> To: cocoon-dev@xml.apache.org
> Subject: RE: Agregating serverpages...?

<snip/>

> Put all matchers for URI you don't want to be accessable from out side
> world into a separate pipeline like this
> 
>    <map:match pattern="myscript.sh">
>     <map:aggregate element="page">
>      <map:part src="catalog" element="public"/>
>      <map:part src="parameters" element="parameters"/>
>     </map:aggregate>
>     <map:serialize/>
>    </map:match>
> 
>   <map:pipeline internal-only="true">
>    <map:match pattern="parameters">
>     <map:generate type="serverpages" src="docs/parameters.xml"/>
>     <map:serialize/>
>    </map:match>
> 
>    <map:match patter="catalog">
>     <map:generate src="docs/experiancatalog.xml"/>
>     <map:serialize/>
>    </map:match>
>   </map:pipeline>
> 
> Giacomo
> 


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


RE: Agregating serverpages...?

Posted by giacomo <gi...@apache.org>.
On Fri, 22 Jun 2001, John Morrison wrote:

> Thanks,
>
> > -----Original Message-----
> > From: giacomo [mailto:giacomo@apache.org]
> > Sent: Friday, 22 June 2001 7:56 pm
> > To: 'cocoon-dev@xml.apache.org'
> > Subject: Re: Agregating serverpages...?
> >
> >
> > On Fri, 22 Jun 2001, Morrison, John wrote:
> >
> > > Could anybody please tell me if the following is possible/correct...?
> > >
> > >    <map:match pattern="myscript.sh">
> > >     <map:aggregate element="page">
> > >      <map:part src="catalog" element="public"/>
> > >      <map:part src="parameters" element="parameters"/>
> > >     </map:aggregate>
> > >     <map:serialize/>
> > >    </map:match>
> > >
> > >    <map:match pattern="parameters">
> > >     <map:generate type="serverpages" src="docs/parameters.xml"/>
> > >    </map:match>
> > >
> > >    <map:match patter="catalog">
> > >     <map:generate src="docs/experiancatalog.xml"/>
> > >    </map:match>
> >
> > Unfortunately the sitemap cannot know where the sitemap component
> > selection process would end. It's not enought to close the match
> > element. You need to specify a serializer to signal end-of-pipeline to
> > the sitemap. So your example should work if you write it like this:
> >
> >     <map:match pattern="myscript.sh">
> >      <map:aggregate element="page">
> >       <map:part src="catalog" element="public"/>
> >       <map:part src="parameters" element="parameters"/>
> >      </map:aggregate>
> >      <map:serialize/>
> >     </map:match>
> >
> >     <map:match pattern="parameters">
> >      <map:generate type="serverpages" src="docs/parameters.xml"/>
> >      <map:serialize/>
> >     </map:match>
>
> but if I do the above how can I stop it from being accessed outside of the
> sitemap?

Put all matchers for URI you don't want to be accessable from out side
world into a separate pipeline like this

   <map:match pattern="myscript.sh">
    <map:aggregate element="page">
     <map:part src="catalog" element="public"/>
     <map:part src="parameters" element="parameters"/>
    </map:aggregate>
    <map:serialize/>
   </map:match>

  <map:pipeline internal-only="true">
   <map:match pattern="parameters">
    <map:generate type="serverpages" src="docs/parameters.xml"/>
    <map:serialize/>
   </map:match>

   <map:match patter="catalog">
    <map:generate src="docs/experiancatalog.xml"/>
    <map:serialize/>
   </map:match>
  </map:pipeline>

Giacomo


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


RE: Agregating serverpages...?

Posted by John Morrison <jo...@ntlworld.com>.
Thanks,

> -----Original Message-----
> From: giacomo [mailto:giacomo@apache.org]
> Sent: Friday, 22 June 2001 7:56 pm
> To: 'cocoon-dev@xml.apache.org'
> Subject: Re: Agregating serverpages...?
>
>
> On Fri, 22 Jun 2001, Morrison, John wrote:
>
> > Could anybody please tell me if the following is possible/correct...?
> >
> >    <map:match pattern="myscript.sh">
> >     <map:aggregate element="page">
> >      <map:part src="catalog" element="public"/>
> >      <map:part src="parameters" element="parameters"/>
> >     </map:aggregate>
> >     <map:serialize/>
> >    </map:match>
> >
> >    <map:match pattern="parameters">
> >     <map:generate type="serverpages" src="docs/parameters.xml"/>
> >    </map:match>
> >
> >    <map:match patter="catalog">
> >     <map:generate src="docs/experiancatalog.xml"/>
> >    </map:match>
>
> Unfortunately the sitemap cannot know where the sitemap component
> selection process would end. It's not enought to close the match
> element. You need to specify a serializer to signal end-of-pipeline to
> the sitemap. So your example should work if you write it like this:
>
>     <map:match pattern="myscript.sh">
>      <map:aggregate element="page">
>       <map:part src="catalog" element="public"/>
>       <map:part src="parameters" element="parameters"/>
>      </map:aggregate>
>      <map:serialize/>
>     </map:match>
>
>     <map:match pattern="parameters">
>      <map:generate type="serverpages" src="docs/parameters.xml"/>
>      <map:serialize/>
>     </map:match>

but if I do the above how can I stop it from being accessed outside of the
sitemap?

>     <map:match patter="catalog">
>      <map:generate src="docs/experiancatalog.xml"/>
>      <map:serialize/>
>     </map:match>
>
> Giacomo
>

<snip/>

J.


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


Re: Agregating serverpages...?

Posted by giacomo <gi...@apache.org>.
On Fri, 22 Jun 2001, Morrison, John wrote:

> Could anybody please tell me if the following is possible/correct...?
>
>    <map:match pattern="myscript.sh">
>     <map:aggregate element="page">
>      <map:part src="catalog" element="public"/>
>      <map:part src="parameters" element="parameters"/>
>     </map:aggregate>
>     <map:serialize/>
>    </map:match>
>
>    <map:match pattern="parameters">
>     <map:generate type="serverpages" src="docs/parameters.xml"/>
>    </map:match>
>
>    <map:match patter="catalog">
>     <map:generate src="docs/experiancatalog.xml"/>
>    </map:match>

Unfortunately the sitemap cannot know where the sitemap component
selection process would end. It's not enought to close the match
element. You need to specify a serializer to signal end-of-pipeline to
the sitemap. So your example should work if you write it like this:

    <map:match pattern="myscript.sh">
     <map:aggregate element="page">
      <map:part src="catalog" element="public"/>
      <map:part src="parameters" element="parameters"/>
     </map:aggregate>
     <map:serialize/>
    </map:match>

    <map:match pattern="parameters">
     <map:generate type="serverpages" src="docs/parameters.xml"/>
     <map:serialize/>
    </map:match>

    <map:match patter="catalog">
     <map:generate src="docs/experiancatalog.xml"/>
     <map:serialize/>
    </map:match>

Giacomo

>
> 'cause it keeps going wrong with the following details...
>
> DEBUG   99322   [cocoon  ] (Thread-8): The sitemap has been successfully
> compiled!
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Changing Cocoon
> context(sitemap.xmap) to prefix()
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): 	from
> context(file:/D:/Wrkfile/Repositories/work/test/) and prefix()
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): 	at URI myscript.sh
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): New context is
> file:/D:/Wrkfile/Repositories/work/test/
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Retrieving a
> org.apache.cocoon.components.pipeline.CachingEventPipeline from the pool
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Retrieving a
> org.apache.cocoon.components.pipeline.CachingStreamPipeline from the pool
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Matched
> wildcardmatcher_wildcard_NBB
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Component
> generator:!content-aggregator!( emptyParam  )
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Retrieving a
> org.apache.cocoon.sitemap.ContentAggregator from the pool
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): ContentAggregator: root
> element='page' ns='' prefix=''
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): ContentAggregator: part
> uri='catalog' element='public' ns='' stripRootElement='' prefix=''
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): ContentAggregator: part
> uri='parameters' element='parameters' ns='' stripRootElement='' prefix=''
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Component
> serializer:xml( emptyParam  )
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Retrieving a
> org.apache.cocoon.serialization.XMLSerializer from the pool
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): ContentAggregator:
> collecting internal resource catalog
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Retrieving a
> org.apache.cocoon.components.pipeline.CachingEventPipeline from the pool
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Retrieving a
> org.apache.cocoon.components.pipeline.CachingStreamPipeline from the pool
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): processing internal
> sitemap request
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Matched
> wildcardmatcher_wildcard_NF5
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Component
> generator:file( emptyParam  )
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Source=docs/catalog.xml
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Retrieving a
> org.apache.cocoon.generation.FileGenerator from the pool
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Matched
> wildcardmatcher_wildcard_NFC
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Component
> generator:file( emptyParam  )
> DEBUG   99322   [cocoon  ] (HttpProcessor[8080][4]): Source=docs/catalog.xml
> WARN    99322   [cocoon  ] (HttpProcessor[8080][4]): Error, try to process
> the error page
> org.apache.cocoon.ProcessingException: Generator already set. You can only
> select one Generator (file)
> 	at
> org.apache.cocoon.components.pipeline.AbstractEventPipeline.setGenerator(Abs
> tractEventPipeline.java:89)
> 	at
> org.apache.cocoon.components.pipeline.CachingEventPipeline.setGenerator(Cach
> ingEventPipeline.java:86)
> 	at
> org.apache.cocoon.www.sitemap_xmap.wildcardMatchNFC(sitemap_xmap.java:1083)
>
>
> =======================================================================
> Information in this email and any attachments are confidential, and may
> not be copied or used by anyone other than the addressee, nor disclosed
> to any third party without our permission.  There is no intention to
> create any legally binding contract or other commitment through the use
> of this email.
>
> Experian Limited (registration number 653331).
> Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>
>
>
>


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