2005-04-06 23:05:46

XSLT and XPath extensions supporting the 4SS repository API

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Create a new repository session. This allows implicit log in on all requests, and the management of persistent state data.

Empty is the content model for childless elements

<Ft.Xml.Xslt.ContentInfo.Atom instance>
{'key': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'ttl': <Ft.Xml.Xslt.AttributeInfo.NumberAvt instance>}

Log in a user and create a new repository session accordingly, establishing a session for the logged in user with implicit log in on all subsequent requests from that agent until timeout. Sessions also support the management of persistent state data. When the repo session eventually times out, the user is redirected to timeout-redirect on the next request.

Empty is the content model for childless elements

<Ft.Xml.Xslt.ContentInfo.Atom instance>
{'failure-redirect': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'password': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'success-redirect': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'timeout-redirect': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'ttl': <Ft.Xml.Xslt.AttributeInfo.NumberAvt instance>, 'user': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>}

Abort the current transaction (governing the current XSLT operation) which will undo all repository operations

Empty is the content model for childless elements

<Ft.Xml.Xslt.ContentInfo.Atom instance>
{}

Sets a key/value pair in the data for the current session data, for persistence in the user agent If the "value" attribute is used, the resulting string is the session entry value. If this attribute is omitted, a node set is the resulting value, whose sole entry is the root node of the result tree fragment from instantiating the template that makes up the content of this element.

Template is the set of text, instructions or result-elements

<Ft.Xml.Xslt.ContentInfo.Rep instance>
{'key': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'value': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>}

Trigger a re-indexing for full-text in the repository (Requires SWISH-E as supporting software)

Empty is the content model for childless elements

<Ft.Xml.Xslt.ContentInfo.Atom instance>
{}

Invoke the full-text search to find text in the repository (Requires SWISH-E as supporting software)

Empty is the content model for childless elements

<Ft.Xml.Xslt.ContentInfo.Atom instance>
{'query': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>}

Delete one of the key/value pairs stored in the session data

Get the resource (path) given a user or group name

Get the resource (path) for the current user

Get the name (not the resource) of the current user

Given a user name, return the user resource path

See if this connection is in a session

Return a hash for a string DEPRECATED - use f:sha-hash()

Resolve a relative URI against a given base, in effect just turning it into a proper repository URI (ftss://...) if no base is given for a relative path

Convert a full repository URI e.g. ("ftss:///spam/eggs") to a repository path (e.g. "/spam/eggs")

Session data is stored under a session ID (a UUID string) and takes the form of zero or more key-value pairs. Each key is a unique string, and each value is either a string or a node-set.

This XSLT extension function coerces the given key to its string-value and returns from the current session the node-set that is associated with that key. If the key does not exist in the current session, or if there is no current session, then an empty node-set is returned. There is no way to distinguish between an empty node-set as an indication of such an error and an empty node-set as the legitimate value for the given key.

Destroy the current session

Convert a repository path (e.g. "/spam/eggs") to a proper repository URI e.g. ("ftss:///spam/eggs")

{('http://xmlns.4suite.org/4ss/score', 'create-session'): <class Ft.Server.Server.Xslt.Repository.CreateSessionElement>, ('http://xmlns.4suite.org/4ss/score', 'login'): <class Ft.Server.Server.Xslt.Repository.LoginElement>, ('http://xmlns.4suite.org/4ss/score', 'repo-text-reindex'): <class Ft.Server.Server.Xslt.Repository.TextReindexRepositoryElement>, ('http://xmlns.4suite.org/4ss/score', 'repo-text-search'): <class Ft.Server.Server.Xslt.Repository.TextSearchRepositoryElement>, ('http://xmlns.4suite.org/4ss/score', 'rollback'): <class Ft.Server.Server.Xslt.Repository.RollbackElement>, ('http://xmlns.4suite.org/4ss/score', 'session-data'): <class Ft.Server.Server.Xslt.Repository.SessionDataElement>}
{('http://xmlns.4suite.org/4ss/score', 'delete-session-data'): <function DeleteSessionData>, ('http://xmlns.4suite.org/4ss/score', 'get-all-document-definition-paths'): <function GetAllDocumentDefinitionPaths>, ('http://xmlns.4suite.org/4ss/score', 'get-current-user'): <function GetCurrentUser>, ('http://xmlns.4suite.org/4ss/score', 'get-current-username'): <function GetCurrentUserName>, ('http://xmlns.4suite.org/4ss/score', 'get-user-name'): <function _GetUserName>, ('http://xmlns.4suite.org/4ss/score', 'get-user-or-group'): <function GetUserOrGroupByName>, ('http://xmlns.4suite.org/4ss/score', 'has-session'): <function HasSession>, ('http://xmlns.4suite.org/4ss/score', 'hash-string'): <function HashString>, ('http://xmlns.4suite.org/4ss/score', 'normalize-uri'): <function NormalizeUri>, ('http://xmlns.4suite.org/4ss/score', 'repo-path-to-uri'): <function RepoPathToUriFunc>, ...}
'http://xmlns.4suite.org/reserved'
'http://xmlns.4suite.org/reserved'
'http://xmlns.4suite.org/4ss/score'