Hello,
this is an example of my dynamic cocoon server side generated user dependant
navigation-tree.
I hope you get the idea.
Regards
Martin
>>> [EMAIL PROTECTED] Montag, 13. Dezember 2004 05:17:45 >>>
hello list ,
can help if have example of creation navigation menu
using xsl or component of cocoon,xpath,
javascript,etc...
by example make click and display/not display element
childs.
+ home
+ about
+ services
+ internet ...
_________________________________________________________
Do You Yahoo!?
Informaci�n de Estados Unidos y Am�rica Latina, en Yahoo! Noticias.
Vis�tanos en http://noticias.espanol.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<?xml version="1.0"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<!-- =========================== Components ================================ -->
<map:components>
<map:generators default="file"/>
<map:transformers default="xslt">
<map:transformer logger="sitemap.transformer.xslt" name="xslt"
pool-grow="2" pool-max="32" pool-min="8"
src="org.apache.cocoon.transformation.TraxTransformer">
<use-request-parameters>true</use-request-parameters>
<use-browser-capabilities-db>false</use-browser-capabilities-db>
<use-deli>false</use-deli>
</map:transformer>
</map:transformers>
<map:readers default="resource"/>
<map:serializers default="html"/>
<map:matchers default="wildcard"/>
<map:selectors default="browser"/>
</map:components>
<!-- =========================== Pipelines ================================= -->
<map:pipelines>
<map:pipeline>
<map:match pattern="*.html">
<map:aggregate element="WIKANETPAGE">
<map:part element="WIKANETUSER" src="user.xml"/><!-- dynamic -->
<map:part element="WIKANETCONTENT" src="content.xml"/>
</map:aggregate>
<map:transform src="content.xsl"/>
<map:serialize type="html"/>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>
<!-- end of file -->
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:variable name="user_language">
<xsl:value-of select="//USER/LANGUAGE" />
</xsl:variable>
<xsl:variable name="fullname">
<xsl:value-of select="//USER/FULLNAME" />
</xsl:variable>
<xsl:param name="old" />
<xsl:param name="new" />
<xsl:variable name="rights"><xsl:for-each
select="//APPLICATION/RIGHT">:::<xsl:value-of
select="."/>:::</xsl:for-each></xsl:variable>
<xsl:variable name="newResult">
<xsl:choose>
<!-- Wenn new in old, dann zuklappen -->
<xsl:when test="contains($old,$new)">
<xsl:value-of
select="concat(substring-before($old,$new),substring-after($old,$new))" />
</xsl:when>
<!-- Ansonsten aufklappen -->
<xsl:otherwise>
<xsl:value-of select="concat($old,$new)" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:template match="/WIKANETPAGE">
<html>
<head>
<title>[EMAIL PROTECTED]</title>
<LINK rel="stylesheet" type="text/css"
href="../../../css/formate.css" />
</head>
<body>
<p>
<xsl:apply-templates select="./WIKANETCONTENT/NAVIGATION" />
</p>
</body>
</html>
</xsl:template>
<xsl:template match="NAVIGATION">
<xsl:apply-templates select="./TOPIC" />
</xsl:template>
<xsl:template match="TOPIC">
<xsl:if test=".//descendant-or-self::TOPIC[not(LINK/URL='' or not(LINK[URL]))
and not(ancestor-or-self::TOPIC[not
(contains($rights,concat(':::',@right,':::')))])]">
<table border="0">
<tr>
<td valign="top">
<xsl:choose>
<xsl:when test="contains($newResult,concat(':',./@id,':'))
and (child::TOPIC)">
<a name="[EMAIL PROTECTED]"></a>
<a>
<xsl:attribute name="href">
<xsl:value-of
select="concat('page.html?','old=',$newResult,'&new=:',@id,':#',@id)" />
</xsl:attribute>
<img src="../../../images/fldo.gif" border="0" />
</a>
</xsl:when>
<xsl:when test="not(child::TOPIC)">
<img src="../../../images/rgn.gif" border="0" />
</xsl:when>
<xsl:otherwise>
<a name="[EMAIL PROTECTED]"></a>
<a>
<xsl:attribute name="href">
<xsl:value-of
select="concat('page.html?','old=',$newResult,'&new=:',@id,':#',@id)" />
</xsl:attribute>
<img src="../../../images/fldc.gif" border="0" />
</a>
</xsl:otherwise>
</xsl:choose>
</td>
<td>
<xsl:choose>
<xsl:when test="./LINK/URL">
<a>
<xsl:attribute name="href">
<xsl:value-of select="./LINK/URL" />
</xsl:attribute>
<xsl:attribute name="target">
<xsl:value-of select="./LINK/URL/@target" />
</xsl:attribute>
<xsl:value-of select="./LINK/[EMAIL
PROTECTED]:lang=$user_language]" />
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="./LINK/[EMAIL
PROTECTED]:lang=$user_language]" />
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
<tr>
<td>
</td>
<td>
<xsl:if test="contains($newResult,concat(':',./@id,':')) and
(child::TOPIC)">
<xsl:apply-templates select="TOPIC" />
</xsl:if>
</td>
</tr>
</table>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<NAVIGATION id="0" idcount="4">
<TOPIC id="1" right="allgemeines-see">
<LINK>
<NAME xml:lang="en">General Informations</NAME>
<NAME xml:lang="de">Allgemeine Informationen</NAME>
<URL target="_self">generell.html</URL>
</LINK>
</TOPIC>
<TOPIC id="2" right="programmmanagement-see">
<LINK>
<NAME xml:lang="en">Programm Management</NAME>
<NAME xml:lang="de">Programm-Management</NAME>
<URL target="_self">management.html</URL>
</LINK>
</TOPIC>
<TOPIC id="3" right="baseline-see">
<LINK>
<NAME xml:lang="en">Base Line</NAME>
<NAME xml:lang="de">Base Line</NAME>
<URL target="_self">baseline.html</URL>
</LINK>
</TOPIC>
<TOPIC id="4" right="KDW-see">
<LINK>
<NAME xml:lang="en">KDW</NAME>
<NAME xml:lang="de">KDW</NAME>
<URL target="_self">KDW.html</URL>
</LINK>
</TOPIC>
</NAVIGATION>
<USER>
<FIRSTNAME>Martin</FIRSTNAME>
<LASTNAME>Geissler</LASTNAME>
<LANGUAGE>de</LANGUAGE>
<USERRIGHTS>
<ADMIN>true</ADMIN>
<APPLICATION>
<NAME>wikanet-admin</NAME>
</APPLICATION>
<APPLICATION>
<NAME>personalinfo</NAME>
<ADMIN>true</ADMIN>
<RIGHT>personalinfo-see</RIGHT>
</APPLICATION>
</USERRIGHTS>
</USER>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]