4Suite API Documentation

Module Ft.Server.Server.Xslt.Repository

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/
Classes:
Functions:
Globals:

Classes

class CreateSessionElement(Ft.Xml.Xslt.cStylesheetTree.XsltElement)
Create a new repository session. This allows implicit log in on all requests, and the management of persistent state data.

Methods

instantiate(self, context, processor)
Overrides: instantiate from class XsltElement

Methods inherited from class Ft.Xml.Xslt.cStylesheetTree.XsltElement

__getstate__, __init__, __iter__, __new__, __repr__, __setstate__, appendChild, insertChild, processChildren, removeChild, replaceChild, setAttribute

Methods inherited from class Ft.Xml.Xslt.cStylesheetTree.XsltNode

__reduce__, idle, isLastChild, pprint, prime, setup

Methods inherited from class object

__delattr__, __getattribute__, __hash__, __reduce_ex__, __setattr__, __str__

Members

__dict__ = <attribute '__dict__' of 'CreateSessionElement' objects>
__weakref__ = <attribute '__weakref__' of 'CreateSessionElement' objects>
content = <ContentModel object>
legalAttrs = {'key': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'ttl': <Ft.Xml.Xslt.AttributeInfo.NumberAvt instance>}

Members inherited from class Ft.Xml.Xslt.cStylesheetTree.XsltElement

attributes, baseUri, children, columnNumber, expandedName, importIndex, lineNumber, namespaces, nodeName, prefix

Members inherited from class Ft.Xml.Xslt.cStylesheetTree.XsltNode

doesIdle, doesPrime, doesSetup, isPseudoNode, parent, root

Members inherited from class object

__class__
class LoginElement(Ft.Xml.Xslt.cStylesheetTree.XsltElement)
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.

Methods

instantiate(self, context, processor)
Overrides: instantiate from class XsltElement

Methods inherited from class Ft.Xml.Xslt.cStylesheetTree.XsltElement

__getstate__, __init__, __iter__, __new__, __repr__, __setstate__, appendChild, insertChild, processChildren, removeChild, replaceChild, setAttribute

Methods inherited from class Ft.Xml.Xslt.cStylesheetTree.XsltNode

__reduce__, idle, isLastChild, pprint, prime, setup

Methods inherited from class object

__delattr__, __getattribute__, __hash__, __reduce_ex__, __setattr__, __str__

Members

__dict__ = <attribute '__dict__' of 'LoginElement' objects>
__weakref__ = <attribute '__weakref__' of 'LoginElement' objects>
content = <ContentModel object>
legalAttrs = {'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>}

Members inherited from class Ft.Xml.Xslt.cStylesheetTree.XsltElement

attributes, baseUri, children, columnNumber, expandedName, importIndex, lineNumber, namespaces, nodeName, prefix

Members inherited from class Ft.Xml.Xslt.cStylesheetTree.XsltNode

doesIdle, doesPrime, doesSetup, isPseudoNode, parent, root

Members inherited from class object

__class__
class RollbackElement(Ft.Xml.Xslt.cStylesheetTree.XsltElement)
Abort the current transaction (governing the current XSLT operation) which will undo all repository operations

Methods

instantiate(self, context, processor)
Overrides: instantiate from class XsltElement

Methods inherited from class Ft.Xml.Xslt.cStylesheetTree.XsltElement

__getstate__, __init__, __iter__, __new__, __repr__, __setstate__, appendChild, insertChild, processChildren, removeChild, replaceChild, setAttribute

Methods inherited from class Ft.Xml.Xslt.cStylesheetTree.XsltNode

__reduce__, idle, isLastChild, pprint, prime, setup

Methods inherited from class object

__delattr__, __getattribute__, __hash__, __reduce_ex__, __setattr__, __str__

Members

__dict__ = <attribute '__dict__' of 'RollbackElement' objects>
__weakref__ = <attribute '__weakref__' of 'RollbackElement' objects>
content = <ContentModel object>
legalAttrs = {}

Members inherited from class Ft.Xml.Xslt.cStylesheetTree.XsltElement

attributes, baseUri, children, columnNumber, expandedName, importIndex, lineNumber, namespaces, nodeName, prefix

Members inherited from class Ft.Xml.Xslt.cStylesheetTree.XsltNode

doesIdle, doesPrime, doesSetup, isPseudoNode, parent, root

Members inherited from class object

__class__
class SessionDataElement(Ft.Xml.Xslt.cStylesheetTree.XsltElement)
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.

Methods

instantiate(self, context, processor)
Overrides: instantiate from class XsltElement

Methods inherited from class Ft.Xml.Xslt.cStylesheetTree.XsltElement

__getstate__, __init__, __iter__, __new__, __repr__, __setstate__, appendChild, insertChild, processChildren, removeChild, replaceChild, setAttribute

Methods inherited from class Ft.Xml.Xslt.cStylesheetTree.XsltNode

__reduce__, idle, isLastChild, pprint, prime, setup

Methods inherited from class object

__delattr__, __getattribute__, __hash__, __reduce_ex__, __setattr__, __str__

Members

__dict__ = <attribute '__dict__' of 'SessionDataElement' objects>
__weakref__ = <attribute '__weakref__' of 'SessionDataElement' objects>
content = <ContentModel object>
legalAttrs = {'key': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'value': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>}

Members inherited from class Ft.Xml.Xslt.cStylesheetTree.XsltElement

attributes, baseUri, children, columnNumber, expandedName, importIndex, lineNumber, namespaces, nodeName, prefix

Members inherited from class Ft.Xml.Xslt.cStylesheetTree.XsltNode

doesIdle, doesPrime, doesSetup, isPseudoNode, parent, root

Members inherited from class object

__class__
class TextReindexRepositoryElement(Ft.Xml.Xslt.cStylesheetTree.XsltElement)
Trigger a re-indexing for full-text in the repository (Requires SWISH-E as supporting software)

Methods

instantiate(self, context, processor)
Overrides: instantiate from class XsltElement

Methods inherited from class Ft.Xml.Xslt.cStylesheetTree.XsltElement

__getstate__, __init__, __iter__, __new__, __repr__, __setstate__, appendChild, insertChild, processChildren, removeChild, replaceChild, setAttribute

Methods inherited from class Ft.Xml.Xslt.cStylesheetTree.XsltNode

__reduce__, idle, isLastChild, pprint, prime, setup

Methods inherited from class object

__delattr__, __getattribute__, __hash__, __reduce_ex__, __setattr__, __str__

Members

__dict__ = <attribute '__dict__' of 'TextReindexRepositoryElement' objects>
__weakref__ = <attribute '__weakref__' of 'TextReindexRepositoryElement' objects>
content = <ContentModel object>
legalAttrs = {}

Members inherited from class Ft.Xml.Xslt.cStylesheetTree.XsltElement

attributes, baseUri, children, columnNumber, expandedName, importIndex, lineNumber, namespaces, nodeName, prefix

Members inherited from class Ft.Xml.Xslt.cStylesheetTree.XsltNode

doesIdle, doesPrime, doesSetup, isPseudoNode, parent, root

Members inherited from class object

__class__
class TextSearchRepositoryElement(Ft.Xml.Xslt.cStylesheetTree.XsltElement)
Invoke the full-text search to find text in the repository (Requires SWISH-E as supporting software)

Methods

instantiate(self, context, processor)
Overrides: instantiate from class XsltElement

Methods inherited from class Ft.Xml.Xslt.cStylesheetTree.XsltElement

__getstate__, __init__, __iter__, __new__, __repr__, __setstate__, appendChild, insertChild, processChildren, removeChild, replaceChild, setAttribute

Methods inherited from class Ft.Xml.Xslt.cStylesheetTree.XsltNode

__reduce__, idle, isLastChild, pprint, prime, setup

Methods inherited from class object

__delattr__, __getattribute__, __hash__, __reduce_ex__, __setattr__, __str__

Members

__dict__ = <attribute '__dict__' of 'TextSearchRepositoryElement' objects>
__weakref__ = <attribute '__weakref__' of 'TextSearchRepositoryElement' objects>
content = <ContentModel object>
legalAttrs = {'query': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>}

Members inherited from class Ft.Xml.Xslt.cStylesheetTree.XsltElement

attributes, baseUri, children, columnNumber, expandedName, importIndex, lineNumber, namespaces, nodeName, prefix

Members inherited from class Ft.Xml.Xslt.cStylesheetTree.XsltNode

doesIdle, doesPrime, doesSetup, isPseudoNode, parent, root

Members inherited from class object

__class__

Functions

DeleteSessionData(context, key)
Delete one of the key/value pairs stored in the session data
GetAllDocumentDefinitionPaths(context, path=None)
Get the resource (path) given a user or group name
GetCurrentUser(context)
Get the resource (path) for the current user
GetCurrentUserName(context)
Get the name (not the resource) of the current user
GetUserOrGroupByName(context, name)
Given a user name, return the user resource path
HasSession(context)
See if this connection is in a session
HashString(context, rawString)
Return a hash for a string DEPRECATED - use f:sha-hash()
NormalizeUri(context, uri, base=None)
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
RepoPathToUriFunc(context, path)
Convert a full repository URI e.g. ("ftss:///spam/eggs") to a repository path (e.g. "/spam/eggs")
SessionData(context, key)
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.
SessionInvalidate(context)
Destroy the current session
UriToRepoPath(context, uri)
Convert a repository path (e.g. "/spam/eggs") to a proper repository URI e.g. ("ftss:///spam/eggs")

Globals

ExtElements = {('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'>}
ExtFunctions = {('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>, ...}
FTSERVER_NAMESPACE = 'http://xmlns.4suite.org/reserved'
RESERVED_NAMESPACE = 'http://xmlns.4suite.org/reserved'
SCORE_NS = 'http://xmlns.4suite.org/4ss/score'