cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlos Dias" <cd...@pontoc.pt>
Subject Use of Session Contexts
Date Wed, 25 Feb 2004 12:38:44 GMT
Hi all,
I need to implement a feature in my application that, I think, can make use of Session Contexts.
I have a XML file with the following information (menu.xml):
<MENU>
    <SUBMENU NAME="SUBMENU1">
        <REPORT NAME="REPORT1">       
        <REPORT NAME="REPORT2">       
    </SUBMENU>
    <SUBMENU NAME="SUBMENU2">
        <REPORT NAME="REPORT1">       
        <REPORT NAME="REPORT2">       
    </SUBMENU>
<MENU>

When the user selects a submenu the report that appears by default is the last one checked
from the current menu. This can be done with "session contexts" right?!
My idea is to create a context with the following information:
<MENU>
    <SUBMENU NAME="SUBMENU1">
        <REPORT NAME="REPORT2">       (last selected report)
    </SUBMENU>
    <SUBMENU NAME="SUBMENU2">    (no report selected)
    </SUBMENU>
<MENU>

After the context creation the pipeline will do something like that:
<map:generate src="menu.xml"/>
<map:transform src="select_last_report_from _menu.xsl"/>
<map:serialize type="html"/>

Can I make a reference to the session context inside "select_last_report_from _menu.xsl"?!
Something like 
<getxml context="mycontext" path=/MENU/SUBMENU[@NAME='REPORT1']/> 

Thanks,
Carlos Dias


Mime
View raw message