4Suite™ API Documentation

# ► Module Ft.Server.Server.Xslt.ResourceMetaData

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

Classes:
AddAclElement, AddAliasElement, DeleteElement, InheritAclElement, MarkTemporaryElement, RemoveAclElement, RemoveAliasElement, SetAclElement, SetContentElement, SetOwnerElement, XUpdateElement

Functions:
AsDom, GetAbsolutePath, GetAclByKey, GetAliases, GetAllAcl, GetContent, GetCreationDate, GetLastModifiedDate, GetMetaDataResource, GetName, GetOwner, GetParent, GetRawContent, GetSize, ResourceType, VerifyAcl

Fields:
ExtElements, ExtFunctions, RESERVED_NAMESPACE, SCORE_NS

## Classes

class AddAclElement(Ft.Xml.Xslt.StylesheetTree.XsltElement)
Add access for an given identifer and level to the ACL of a resource

### 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 = {'access': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'allowed': <Ft.Xml.Xslt.AttributeInfo.YesNoAvt instance>, 'ident': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'path': <Ft.Xml.Xslt.AttributeInfo.UriReferenceAvt instance>}

### Fields

class AddAliasElement(Ft.Xml.Xslt.StylesheetTree.XsltElement)
Adds an alias for this resource to the repository.

### 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 = {'alias': <Ft.Xml.Xslt.AttributeInfo.UriReferenceAvt instance>, 'doc-def': <Ft.Xml.Xslt.AttributeInfo.UriReferenceAvt instance>, 'path': <Ft.Xml.Xslt.AttributeInfo.UriReferenceAvt instance>}

### Fields

class DeleteElement(Ft.Xml.Xslt.StylesheetTree.XsltElement)
Delete this resource

### 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 = {'path': <Ft.Xml.Xslt.AttributeInfo.UriReferenceAvt instance>}

### Fields

class InheritAclElement(Ft.Xml.Xslt.StylesheetTree.XsltElement)
Set the inheritance ACL of a resource

### 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 = {'access': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'path': <Ft.Xml.Xslt.AttributeInfo.UriReferenceAvt instance>}

### Fields

class MarkTemporaryElement(Ft.Xml.Xslt.StylesheetTree.XsltElement)
Mark a resource as temporary

### 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 = {'path': <Ft.Xml.Xslt.AttributeInfo.UriReferenceAvt instance>, 'time-to-live': <Ft.Xml.Xslt.AttributeInfo.NumberAvt instance>}

### Fields

class RemoveAclElement(Ft.Xml.Xslt.StylesheetTree.XsltElement)
Remove the ACL from a resource

### 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 = {'access': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'ident': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'path': <Ft.Xml.Xslt.AttributeInfo.UriReferenceAvt instance>}

### Fields

class RemoveAliasElement(Ft.Xml.Xslt.StylesheetTree.XsltElement)
Remove an alias for this resource from the repository.

### 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 = {'alias': <Ft.Xml.Xslt.AttributeInfo.UriReferenceAvt instance>, 'path': <Ft.Xml.Xslt.AttributeInfo.UriReferenceAvt instance>}

### Fields

class SetAclElement(Ft.Xml.Xslt.StylesheetTree.XsltElement)
Reset the ACL for a resource, and then optionally add access for an given identifer and level to the ACL of a resource

### 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 = {'access': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'allowed': <Ft.Xml.Xslt.AttributeInfo.YesNoAvt instance>, 'ident': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'path': <Ft.Xml.Xslt.AttributeInfo.UriReferenceAvt instance>}

### Fields

class SetContentElement(Ft.Xml.Xslt.StylesheetTree.XsltElement)
Set the string content of the resource with the given path, document definition and type. The output of the body of the element makes up the content of the resulting document, either literally or as a result of the contained XSLT instructions (according to the literal-content attribute). All the attributes available on the xsl:output instruction are also allowed on this element, in order to control the creation of the content. If the resource is a document whose definition specifies a full text index, then the content is re-indexed

### 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>, 'literal-content': <Ft.Xml.Xslt.AttributeInfo.YesNo instance>, 'media-type': <Ft.Xml.Xslt.AttributeInfo.StringAvt instance>, 'method': <Ft.Xml.Xslt.AttributeInfo.QNameAvt instance>, ...}

### Fields

class SetOwnerElement(Ft.Xml.Xslt.StylesheetTree.XsltElement)
Change the owner of a resource

### 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 = {'owner': <Ft.Xml.Xslt.AttributeInfo.UriReferenceAvt instance>, 'path': <Ft.Xml.Xslt.AttributeInfo.UriReferenceAvt instance>}

### Fields

class XUpdateElement(Ft.Xml.Xslt.StylesheetTree.XsltElement)
Allows XML content to be updated with the XUpdate protocol
The content of the fcore:xupdate element is a template for
the XUpdate document source.

### 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.Rep instance>
Template is the set of text, instructions or result-elements
legalAttrs = {'path': <Ft.Xml.Xslt.AttributeInfo.UriReferenceAvt instance>}

### Fields

## Functions

AsDom(context, path=None)
Get an RTF that is as a live version of the document function. NOTE: This does not work like document(), where document() caches RTFs and always returns the same one per the spec, as-dom will return the latest in the repo.
GetAbsolutePath(context, path=None)
Get the full path into the system, resolving aliases if needed
GetAclByKey(context, aclKey, path=None)
GetAliases(context, path=None)
Get a list of alias objects that reference this object
GetAllAcl(context, path=None)
GetContent(context, path=None, encoding='LATIN-1')
Get the string content of this resource as an XPath string object
path - the repository path to the object to retrieve
encoding - the encoding to use in converting the content to Unicode
GetCreationDate(context, path=None)
Get the date the resource was created
GetLastModifiedDate(context, path=None)
Get the date the resource was last modified
GetMetaDataResource(context, path=None)
Get the string meta data of this resource
GetName(context, path=None)
Get the name of the resource.
GetOwner(context, path=None)
Get the owner of the resource
GetParent(context, path=None)
Get the parent container of this resource
GetRawContent(context, path=None, encoding='iso-8859-1')
Get the string content of this resource as a raw Unicode object
path - the repository path to the object to retrieve
encoding - the encoding to use in converting the content to Unicode
GetSize(context, path=None)
Get the size of the resource
ResourceType(context, path=None)
Get the resource type of the resource
VerifyAcl(context, aclKey, path=None, verifyTraverse=1)
Verify that the testAclIdent is in the acl list specified by the acl key for this object.

## Fields

ExtElements = {('http://xmlns.4suite.org/4ss/score', 'add-acl'): <class Ft.Server.Server.Xslt.ResourceMetaData.AddAclElement>, ('http://xmlns.4suite.org/4ss/score', 'add-alias'): <class Ft.Server.Server.Xslt.ResourceMetaData.AddAliasElement>, ('http://xmlns.4suite.org/4ss/score', 'delete-resource'): <class Ft.Server.Server.Xslt.ResourceMetaData.DeleteElement>, ('http://xmlns.4suite.org/4ss/score', 'inherit-acl'): <class Ft.Server.Server.Xslt.ResourceMetaData.InheritAclElement>, ('http://xmlns.4suite.org/4ss/score', 'mark-temporary'): <class Ft.Server.Server.Xslt.ResourceMetaData.MarkTemporaryElement>, ('http://xmlns.4suite.org/4ss/score', 'remove-acl'): <class Ft.Server.Server.Xslt.ResourceMetaData.RemoveAclElement>, ('http://xmlns.4suite.org/4ss/score', 'remove-alias'): <class Ft.Server.Server.Xslt.ResourceMetaData.RemoveAliasElement>, ('http://xmlns.4suite.org/4ss/score', 'set-acl'): <class Ft.Server.Server.Xslt.ResourceMetaData.SetAclElement>, ('http://xmlns.4suite.org/4ss/score', 'set-content'): <class Ft.Server.Server.Xslt.ResourceMetaData.SetContentElement>, ('http://xmlns.4suite.org/4ss/score', 'set-owner'): <class Ft.Server.Server.Xslt.ResourceMetaData.SetOwnerElement>, ...}
ExtFunctions = {('http://xmlns.4suite.org/4ss/score', 'as-dom'): <function AsDom>, ('http://xmlns.4suite.org/4ss/score', 'get-absolute-path'): <function GetAbsolutePath>, ('http://xmlns.4suite.org/4ss/score', 'get-acl-by-key'): <function GetAclByKey>, ('http://xmlns.4suite.org/4ss/score', 'get-aliases'): <function GetAliases>, ('http://xmlns.4suite.org/4ss/score', 'get-all-acl'): <function GetAllAcl>, ('http://xmlns.4suite.org/4ss/score', 'get-content'): <function GetContent>, ('http://xmlns.4suite.org/4ss/score', 'get-creation-date'): <function GetCreationDate>, ('http://xmlns.4suite.org/4ss/score', 'get-last-modified-date'): <function GetLastModifiedDate>, ('http://xmlns.4suite.org/4ss/score', 'get-metadata-resource'): <function GetMetaDataResource>, ('http://xmlns.4suite.org/4ss/score', 'get-name'): <function GetName>, ...}
RESERVED_NAMESPACE = 'http://xmlns.4suite.org/reserved'
SCORE_NS = 'http://xmlns.4suite.org/4ss/score'