Custom Web Publishing Guide

Table Of Contents
64 FileMaker Server Advanced Custom Web Publishing Guide
If the client does not allow cookies, the page includes:
<a href="my_stylesheet.xsl;jsessionid=<session id>?–db=products&–lay=sales&–grammar=fmresultset&–findall">
hyperlinked text</a>
If the Web Publishing Engine detects that the client allows cookies, then the fmxslt:session_encode_url()
function stores the session ID in a cookie instead of the URL.
Note Session information does not persist after the Web Publishing Engine is restarted.
Using the session extension functions
Use the following session extension functions to manipulate session variables. You can store a string,
number, boolean value, or
node-set in a session object. By using node-set, you can create a data structure in
XML and then store it between requests in the session object.
Session extension function
Data type
returned Description
fmxslt:session_exists(String session-name) boolean Checks if a session with the specified name
exists.
fmxslt:create_session(String session-name) boolean Creates a session with the specified session
name and the default time-out, which is set via
the Administration Console. See the FileMaker
Server Advanced Web Publishing Installation
Guide.
Note This function requires the <?xslt-cwp-
buffer?> processing instruction. See “Using
content buffering” on page 63.
fmxslt:invalidate_session(String session-name) boolean Forces the session to time out immediately.
fmxslt:set_session_timeout(String
session-name, Number timeout)
boolean Sets the session timeout in minutes.
The default timeout for sessions is set via the
Administration Console.
fmxslt:session_encode_url(String url) string Encodes a URL with the session ID if the client
does not support cookies; otherwise returns
input URL.
fmxslt:set_session_object(String
session-name, String name, Object value)
XSLT object
(number, string,
boolean, or node-set)
Stores an XSLT object (a number, string,
boolean, or node-set) under a session, which can
be later retrieved using the
fmxslt:get_session_object () function.
This function also returns the previously stored
object under the specified session object name.
If nothing was stored under the name, it returns
a null object.
fmxslt:get_session_object(String
session-name, String name)
XSLT object Retrieves an XSLT object from the session.
fmxslt:remove_session_object(String
session-name, String name)
XSLT object Returns and then removes an XSLT object from
the session.