An XSP Logicsheet that's bundled with the Cocoon distribution (see also BuiltInLogicsheets)

It provides an XML syntax which is essentially a simple wrapper around session context provided by the session framework (session-fw block). See the official Session context documentation.


The namespace declaration of this logicsheet is: xmlns:xsp-session-fw="http://apache.org/xsp/session-fw/1.0"'''<<BR>> Currently there is just one tag in the logicsheet: <xsp-session-fw:getxml>

<xsp-session-fw:getxml>

This tag allows read contexts data.

Attributes

The idea of the default as="string" is to let you add easily inside your XSP some strings. i.e: to show the user name in a welcome page:

<p>Hi <xsp-session-fw:getxml
         context="authentication"
         path="/authentication/data/full_name"/>, welcome back to the System
</p>

In this example the path attribute always exists, so we don't need to test if the path really exists in the given session context.

If you need to test if the path exists, then use as="object", get the object and if the object is null, then there is nothing. Else the path exists so you can get it using as="string".

XspSessionFw (last edited 2009-09-20 23:39:52 by localhost)