You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Andreas Hartmann <an...@apache.org> on 2004/09/02 17:36:14 UTC

[RT] [Navigation Framework] Serial instead of parallel processing

Hi Lenya developers,

currently the navigation framework uses parallel processing
for all navigation elements:

              -> sitetree2nav.xsl -> menu.xsl       ->
sitetree.xml -> sitetree2nav.xsl -> tabs.xsl       -> aggregation
              -> sitetree2nav.xsl -> breadcrumb.xsl ->


I could imagine to speed this up by applying sitetree2nav
only once:


sitetree.xml -> sitetree2nav.xsl -> menu -> tabs -> breadcrumb ->


This would look as follows:

<map:match pattern="navigation.xml">
   <map:generate src="cocoon://{pub-id}/navigation-tree.xml"/>
   <map:transform src="{fallback:lenya/xslt/navigation/menu.xsl}"/>
   <map:transform src="{fallback:lenya/xslt/navigation/tabs.xsl}"/>
   <map:transform src="{fallback:lenya/xslt/navigation/breadcrumb.xsl}"/>
   <map:serialize type="xml"/>
</map:match>


Of course, each stylesheet would have to pass through the output of
all preceding stylesheets:

<xsl:template match="lenya:navigation">
   <xsl:copy>
     <xsl:copy-of select="xhtml:div"/>
     <div id="breadcrumb">
       ...
     </div>
   </xsl:copy>
</xsl:template>


The final navigation XML would look as follows:

<lenya:navigation>
   <div id="breadcrumb"> ... </div>
   <div id="menu"> ... </div>
   <div id="tabs"> ... </div>
</lenya:navigation>


Maybe I'll make some performance tests.

WDYT?

-- Andreas


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


Re: [RT] [Navigation Framework] Serial instead of parallel processing

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Andreas Hartmann wrote:

> Hi Lenya developers,
> 
> currently the navigation framework uses parallel processing
> for all navigation elements:
> 
>              -> sitetree2nav.xsl -> menu.xsl       ->
> sitetree.xml -> sitetree2nav.xsl -> tabs.xsl       -> aggregation
>              -> sitetree2nav.xsl -> breadcrumb.xsl ->

another option would be to fold menu.xsl, tabs.xsl and breadcrumb.xsl 
into one stylesheet navigation.xsl. this would avoid the passthrough and 
would also make it easier to customize the navigation if you have needs 
outside the traditional menu, tabs, breadcrumbs trifecta.

the processing steps between the tree could be reused with some clever 
factoring out of templates, one presumes.

-- 
Gregor J. Rothfuss
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://wyona.com                   http://cocoon.apache.org/lenya
gregor.rothfuss@wyona.com                       gregor@apache.org

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