cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakob Praher <jpra...@yahoo.de>
Subject Re: cinclude and sitemap parameters
Date Tue, 12 Nov 2002 15:40:27 GMT

yeah the question is what is then more efficient:

the map:aggregate mechanics or a compiled xsp page
I am only wondering since Ovidiu, on his weblog,
states that map:aggregate is harmful.

given that you can do dyamic includes with
map:aggregate it is the question what is more
performant...

-- Jakob

 --- Geoff Howard <cocoongeoff@yahoo.com> schrieb: >
IMHO it makes more sense to make aggreate.xml
> dynamic
> - a very simple xsp taking a parameter from the
> sitemap would do what you want and involves no
> further
> transforms beside the cinclude.  Look into xsp.
> 
> Geoff Howard
> 
> --- Jakob Praher <jpraher@yahoo.de> wrote:
> > 
> > > 
> > > Try like:
> > > 
> > >  <map:match pattern="composite/**">
> > >     <map:generate src="aggreate.xml" />
> > >     <map:transform src="sample.xsl">
> > >        <map:parameter name="uri"
> > value="cocoon:/{1}"
> > > />     
> > >     </map:transform>
> > >     <map:transform type="cinclude"/>
> > >     <map:serialize/>
> > >  </map:match>
> > > 
> > > sample.xsl
> > > 
> > > <?xml version="1.0"?>
> > > <xsl:stylesheet
> > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> > >  
> xmlns:ci="http://apache.org/cocoon/include/1.0"
> > >   version="1.0">
> > > 
> > >   <xsl:output method="xml"/>
> > > 
> > >   <xsl:param name="uri"/>
> > > 
> > >   <xsl:template match="/">
> > >     <xsl:apply-templates select="page"/>
> > >   </xsl:template>
> > > 
> > >   <xsl:template match="page">
> > >    <page>
> > >     <cinclude:include src="{$uri}" ... />
> > >    </page>
> > >   </xsl:template>
> > > 
> > >     <xsl:template match="*">
> > >       <!-- remove element prefix (if any) -->
> > >       <xsl:element name="{local-name()}">
> > >         <!-- process attributes -->
> > >         <xsl:for-each select="@*">
> > >           <!-- remove attribute prefix (if any)
> > -->
> > >           <xsl:attribute name="{local-name()}">
> > >             <xsl:value-of select="."/>
> > >           </xsl:attribute>
> > >         </xsl:for-each>
> > >         <xsl:apply-templates/>
> > >       </xsl:element>
> > >   </xsl:template>
> > > 
> > > </xsl:stylesheet>
> > > 
> > > 
> > 
> > good idea.
> > but it invokes another transformation.
> > given that the transformation could be chached,
> this
> > should not matter too much.
> > but it would be a good thing to be able to access
> > the
> > sitemap parameters within a resolver uri like
> that:
> > cocoon:/{uri} ... this would denote the parameter
> > uri
> > or something like that... .
> > 
> > -- Jakob
> > 
> >
>
__________________________________________________________________
> > 
> > Gesendet von Yahoo! Mail - http://mail.yahoo.de
> > Möchten Sie mit einem Gruß antworten?
> > http://grusskarten.yahoo.de
> > 
> >
>
---------------------------------------------------------------------
> > 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:    
> > <cocoon-users-unsubscribe@xml.apache.org>
> > For additional commands, e-mail:  
> > <cocoon-users-help@xml.apache.org>
> > 
> 
> 
> __________________________________________________
> Do you Yahoo!?
> U2 on LAUNCH - Exclusive greatest hits videos
> http://launch.yahoo.com/u2
> 
>
---------------------------------------------------------------------
> 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:    
> <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:  
> <cocoon-users-help@xml.apache.org>
>  

__________________________________________________________________

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Möchten Sie mit einem Gruß antworten? http://grusskarten.yahoo.de

---------------------------------------------------------------------
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:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message