4Suite™ API Documentation

# ► Module Ft.Server.Server.Xslt.Container

XSLT and XPath extensions supporting the 4SS container API
Copyright 2003 Fourthought, Inc. (USA).
Detailed license and copyright information: http://4suite.org/COPYRIGHT
Project home, documentation, distributions: http://4suite.org/

Classes: CreateContainerElement, CreateDocumentElement, CreateGroupElement, CreateRawFileElement, CreateUriReferenceElement, CreateUserElement |  |  |  | Functions: HasResource |  |  |  | Fields: ExtElements, ExtFunctions, SCORE_NS

## Classes

class CreateContainerElement(Ft.Xml.Xslt.StylesheetTree.XsltElement)
Creates a container, if createParents is true then all its parents along the path are created (if they dont exist). createParents defaults to false if not set. The base-path attribute is the base to use for the new containers path, if relative. If not specified it uses the path of the source document.

### Methods

instantiate(self, context, processor)

### Methods inherited from class Ft.Xml.Xslt.StylesheetTree.XsltElement

__init__, __str__, appendChild, expandQName, insertChild, parseAVT, parseExpression, parsePattern, processChildren, splitQName

### Methods inherited from class Ft.Xml.Xslt.StylesheetTree.XsltNode

idle, isLastChild, isPseudoNode, pprint, prime, setup

### Fields

content = <Ft.Xml.Xslt.ContentInfo.Atom instance>
Empty is the content model for childless elements
legalAttrs = {'base-path': <Ft.Xml.Xslt.AttributeInfo.UriReferenceAvt instance>, 'create-parents': <Ft.Xml.Xslt.AttributeInfo.YesNoAvt instance>, 'path': <Ft.Xml.Xslt.AttributeInfo.UriReferenceAvt instance>}

### Fields

class CreateDocumentElement(Ft.Xml.Xslt.StylesheetTree.XsltElement)
Creates a document with the given path, document definition and type. The output of the body of the element makes up the content of the resulting document. All the attributes available on the xsl:output instruction are also allowed on this element, in order to control the generation of the document. If the document type is not specified, and the internet media type of the source is XML, the type will be inferred from the content, if possible. If path is an empty string, then a UUID will be generated for the file name, which will be placed in the container that holds the source document of the transform. If the document definition specifies a full text index, then the content is indexed
The content of the fcore:create-document element is a template; this is
instantiated to create a sequence of nodes; a root node is created with
this sequence of nodes as its children; the tree with this root node
represents the subsidiary result document.

### Methods

instantiate(self, context, processor)
setup(self)

### Methods inherited from class Ft.Xml.Xslt.StylesheetTree.XsltElement

__init__, __str__, appendChild, expandQName, insertChild, parseAVT, parseExpression, parsePattern, processChildren, splitQName

### Methods inherited from class Ft.Xml.Xslt.StylesheetTree.XsltNode

idle, isLastChild, isPseudoNode, pprint, prime

### Fields

content = <Ft.Xml.Xslt.ContentInfo.Rep instance>
Template is the set of text, instructions or result-elements
doesSetup = True
legalAttrs = {'base-path': <Ft.Xml.Xslt.AttributeInfo.UriReferenceAvt instance>, 'cdata-section-elements': <Ft.Xml.Xslt.AttributeInfo.QNamesAvt instance>, 'docdef': <Ft.Xml.Xslt.AttributeInfo.UriReferenceAvt instance>, 'doctype-public': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'doctype-system': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'encoding': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'imt': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'indent': <Ft.Xml.Xslt.AttributeInfo.YesNoAvt instance>, 'media-type': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'method': <Ft.Xml.Xslt.AttributeInfo.QNameAvt instance>, ...}

### Fields

class CreateGroupElement(Ft.Xml.Xslt.StylesheetTree.XsltElement)
Creates a new group with the specified path. A group is a set of users and other groups.

### Methods

instantiate(self, context, processor)

### Methods inherited from class Ft.Xml.Xslt.StylesheetTree.XsltElement

__init__, __str__, appendChild, expandQName, insertChild, parseAVT, parseExpression, parsePattern, processChildren, splitQName

### Methods inherited from class Ft.Xml.Xslt.StylesheetTree.XsltNode

idle, isLastChild, isPseudoNode, pprint, prime, setup

### Fields

content = <Ft.Xml.Xslt.ContentInfo.Atom instance>
Empty is the content model for childless elements
legalAttrs = {'base-path': <Ft.Xml.Xslt.AttributeInfo.UriReferenceAvt instance>, 'path': <Ft.Xml.Xslt.AttributeInfo.UriReferenceAvt instance>}

### Fields

class CreateRawFileElement(Ft.Xml.Xslt.StylesheetTree.XsltElement)
Creates a raw file resource, using the specified path and internet media type. The output of the body of the element makes up the content of the resulting document. All the attributes available on the xsl:output instruction are also allowed on this element, in order to control the generation of the document.
In order to set the IMT, use the media-type attribute
The default is text/plain
There is also a special value for the method attribute
method="binary" is equivalent to method="text" and
encoding="latin-1" (to simulate the binary byte stream)

### Methods

instantiate(self, context, processor)
setup(self)

### Methods inherited from class Ft.Xml.Xslt.StylesheetTree.XsltElement

__init__, __str__, appendChild, expandQName, insertChild, parseAVT, parseExpression, parsePattern, processChildren, splitQName

### Methods inherited from class Ft.Xml.Xslt.StylesheetTree.XsltNode

idle, isLastChild, isPseudoNode, pprint, prime

### Fields

content = <Ft.Xml.Xslt.ContentInfo.Rep instance>
Template is the set of text, instructions or result-elements
doesSetup = True
legalAttrs = {'base-path': <Ft.Xml.Xslt.AttributeInfo.UriReferenceAvt instance>, 'cdata-section-elements': <Ft.Xml.Xslt.AttributeInfo.QNamesAvt instance>, 'content-as-string': <Ft.Xml.Xslt.AttributeInfo.YesNo instance>, 'doctype-public': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'doctype-system': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'encoding': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'indent': <Ft.Xml.Xslt.AttributeInfo.YesNoAvt instance>, 'media-type': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'method': <Ft.Xml.Xslt.AttributeInfo.QNameAvt instance>, 'omit-xml-declaration': <Ft.Xml.Xslt.AttributeInfo.YesNoAvt instance>, ...}

### Fields

class CreateUriReferenceElement(Ft.Xml.Xslt.StylesheetTree.XsltElement)
Creates a new uri reference resource. A URI reference resource is a special object that references an external URI (which can be a file) and loads its contents whenever the resource is requested. It behaves in some ways similar to a soft link in UNIX.

### Methods

instantiate(self, context, processor)

### Methods inherited from class Ft.Xml.Xslt.StylesheetTree.XsltElement

__init__, __str__, appendChild, expandQName, insertChild, parseAVT, parseExpression, parsePattern, processChildren, splitQName

### Methods inherited from class Ft.Xml.Xslt.StylesheetTree.XsltNode

idle, isLastChild, isPseudoNode, pprint, prime, setup

### Fields

content = <Ft.Xml.Xslt.ContentInfo.Atom instance>
Empty is the content model for childless elements
legalAttrs = {'base-path': <Ft.Xml.Xslt.AttributeInfo.UriReferenceAvt instance>, 'imt': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'path': <Ft.Xml.Xslt.AttributeInfo.UriReferenceAvt instance>, 'source-uri': <Ft.Xml.Xslt.AttributeInfo.UriReferenceAvt instance>}

### Fields

class CreateUserElement(Ft.Xml.Xslt.StylesheetTree.XsltElement)
Create a new user in the system

### Methods

instantiate(self, context, processor)

### Methods inherited from class Ft.Xml.Xslt.StylesheetTree.XsltElement

__init__, __str__, appendChild, expandQName, insertChild, parseAVT, parseExpression, parsePattern, processChildren, splitQName

### Methods inherited from class Ft.Xml.Xslt.StylesheetTree.XsltNode

idle, isLastChild, isPseudoNode, pprint, prime, setup

### Fields

content = <Ft.Xml.Xslt.ContentInfo.Atom instance>
Empty is the content model for childless elements
legalAttrs = {'base-path': <Ft.Xml.Xslt.AttributeInfo.UriReferenceAvt instance>, 'password': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'username': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>}

### Fields

## Functions

HasResource(context, path)
Query if the system has a resource specified by the path

## Fields

ExtElements = {('http://xmlns.4suite.org/4ss/score', 'create-container'): <class Ft.Server.Server.Xslt.Container.CreateContainerElement>, ('http://xmlns.4suite.org/4ss/score', 'create-document'): <class Ft.Server.Server.Xslt.Container.CreateDocumentElement>, ('http://xmlns.4suite.org/4ss/score', 'create-group'): <class Ft.Server.Server.Xslt.Container.CreateGroupElement>, ('http://xmlns.4suite.org/4ss/score', 'create-raw-file'): <class Ft.Server.Server.Xslt.Container.CreateRawFileElement>, ('http://xmlns.4suite.org/4ss/score', 'create-uri-reference'): <class Ft.Server.Server.Xslt.Container.CreateUriReferenceElement>, ('http://xmlns.4suite.org/4ss/score', 'create-user'): <class Ft.Server.Server.Xslt.Container.CreateUserElement>}
ExtFunctions = {('http://xmlns.4suite.org/4ss/score', 'has-resource'): <function HasResource>}
SCORE_NS = 'http://xmlns.4suite.org/4ss/score'