# Extension Module - Ft.Server.Server.Xslt

    XSLT extension elements and functions supporting the 4SS repository API

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

## Namespaces

The namespaces for extensions defined in this document are:

Prefix | Namespace
--- | ---
`fcore` | `http://xmlns.4suite.org/4ss/score`
`fhttp` | `http://xmlns.4suite.org/4ss/http`
`fimap` | `http://xmlns.4suite.org/4ss/imap`
`frdf` | `http://xmlns.4suite.org/4ss/rdf`
`futil` | `http://xmlns.4suite.org/4ss/util`

The prefixes are given for this document only. Any other prefix can be used within a particular stylesheet.

## Functions

Function | Syntax
--- | ---
fcore:as-dom | unknown fcore:as-dom(path)
fcore:delete-session-data | unknown fcore:delete-session-data(key)
fcore:get-absolute-path | unknown fcore:get-absolute-path(path)
fcore:get-acl-by-key | unknown fcore:get-acl-by-key(aclKey, path)
fcore:get-aliases | unknown fcore:get-aliases(path)
fcore:get-all-acl | unknown fcore:get-all-acl(path)
fcore:get-all-document-definition-paths | unknown fcore:get-all-document-definition-paths(path)
fcore:get-available-handlers | unknown fcore:get-available-handlers(module)
fcore:get-available-modules | unknown fcore:get-available-modules()
fcore:get-base-definitions | unknown fcore:get-base-definitions(path)
fcore:get-content | unknown fcore:get-content(path, encoding)
fcore:get-creation-date | unknown fcore:get-creation-date(path)
fcore:get-creation-params | unknown fcore:get-creation-params(path)
fcore:get-current-user | unknown fcore:get-current-user()
fcore:get-current-username | unknown fcore:get-current-username()
fcore:get-derived-definitions | unknown fcore:get-derived-definitions(path)
fcore:get-document-definition | unknown fcore:get-document-definition(path)
fcore:get-groups | unknown fcore:get-groups(path)
fcore:get-imt | unknown fcore:get-imt(path)
fcore:get-last-modified-date | unknown fcore:get-last-modified-date(path)
fcore:get-member-paths | unknown fcore:get-member-paths(group)
fcore:get-metadata-resource | unknown fcore:get-metadata-resource(path)
fcore:get-name | unknown fcore:get-name(path)
fcore:get-ns-map | unknown fcore:get-ns-map(path)
fcore:get-owner | unknown fcore:get-owner(path)
fcore:get-parent | unknown fcore:get-parent(path)
fcore:get-raw-content | unknown fcore:get-raw-content(path, encoding)
fcore:get-rdf-maps | unknown fcore:get-rdf-maps(path)
fcore:get-reference | unknown fcore:get-reference(path)
fcore:get-size | unknown fcore:get-size(path)
fcore:get-user-data | unknown fcore:get-user-data(key, path)
fcore:get-user-data-keys | unknown fcore:get-user-data-keys(path)
fcore:get-user-name | unknown fcore:get-user-name()
fcore:get-user-or-group | unknown fcore:get-user-or-group(name)
fcore:get-username | unknown fcore:get-username(path)
fcore:has-resource | unknown fcore:has-resource(path)
fcore:has-session | unknown fcore:has-session()
fcore:hash-string | unknown fcore:hash-string(rawString)
fcore:normalize-uri | unknown fcore:normalize-uri(uri, base)
fcore:remove-user-data | unknown fcore:remove-user-data(key, path)
fcore:repo-path-to-uri | unknown fcore:repo-path-to-uri(path)
fcore:resource-type | unknown fcore:resource-type(path)
fcore:session-data | unknown fcore:session-data(key)
fcore:session-invalidate | unknown fcore:session-invalidate()
fcore:set-user-data | unknown fcore:set-user-data(key, value, path)
fcore:uri-to-repo-path | unknown fcore:uri-to-repo-path(uri)
fcore:verify-acl | unknown fcore:verify-acl(aclKey, path, verifyTraverse)
fhttp:get-query-args | unknown fhttp:get-query-args()
fhttp:local-path | unknown fhttp:local-path(path)
fhttp:local-uri | unknown fhttp:local-uri(uri)
frdf:any | unknown frdf:any()
frdf:complete | unknown frdf:complete(subj, pred, obj)
frdf:contains | unknown frdf:contains(subj, pred, obj)
frdf:versa-query | unknown frdf:versa-query(query, scope)

## Elements

Element | Syntax
--- | ---
fcore:add-acl | <fcore:add-acl access = { string } ident = { string } allowed = { "yes" | "no" } path = { uri-reference } />
fcore:add-alias | <fcore:add-alias alias = { uri-reference } doc-def = { uri-reference } path = { uri-reference } />
fcore:add-base-document-definition | <fcore:add-base-document-definition docdef = { uri-reference } path = { uri-reference } />
fcore:add-member | <fcore:add-member member-path = { uri-reference } path = { uri-reference } />
fcore:add-ns-map | <fcore:add-ns-map prefix = { prefix } uri = { uri-reference } path = { uri-reference } />
fcore:add-rdf-map | <fcore:add-rdf-map object = { string } object-is-resource = { "yes" | "no" } predicate = { string } subject = { string } path = { uri-reference } />
fcore:change-password | <fcore:change-password path = { uri-reference } new-password = { string } />
fcore:create-container | <fcore:create-container path = { uri-reference } base-path = { uri-reference } create-parents = { "yes" | "no" } />
fcore:create-document | <fcore:create-document base-path = { uri-reference } cdata-section-elements = { qnames } docdef = { uri-reference } doctype-public = { string } doctype-system = { string } encoding = { string } imt = { string } indent = { "yes" | "no" } media-type = { string } method = { qname } omit-xml-declaration = { "yes" | "no" } path = { uri-reference } standalone = { "yes" | "no" } type = { string } version = { nmtoken } <!-- Content: template --> />
fcore:create-group | <fcore:create-group path = { uri-reference } base-path = { uri-reference } />
fcore:create-raw-file | <fcore:create-raw-file base-path = { uri-reference } cdata-section-elements = { qnames } content-as-string = "yes" | "no" doctype-public = { string } doctype-system = { string } encoding = { string } indent = { "yes" | "no" } media-type = { string } method = { qname } omit-xml-declaration = { "yes" | "no" } path = { uri-reference } standalone = { "yes" | "no" } version = { nmtoken } <!-- Content: template --> />
fcore:create-session | <fcore:create-session key = { string } ttl = { number } />
fcore:create-uri-reference | <fcore:create-uri-reference path = { uri-reference } base-path = { uri-reference } imt = { string } source-uri = { uri-reference } />
fcore:create-user | <fcore:create-user password = { string } username = { string } base-path = { uri-reference } />
fcore:delete-resource | <fcore:delete-resource path = { uri-reference } />
fcore:inherit-acl | <fcore:inherit-acl access = { string } path = { uri-reference } />
fcore:login | <fcore:login password = { string } user = { string } failure-redirect = { string } success-redirect = { string } timeout-redirect = { string } ttl = { number } />
fcore:mark-temporary | <fcore:mark-temporary time-to-live = { number } path = { uri-reference } />
fcore:remove-acl | <fcore:remove-acl access = { string } ident = { string } path = { uri-reference } />
fcore:remove-alias | <fcore:remove-alias alias = { uri-reference } path = { uri-reference } />
fcore:remove-base-document-definition | <fcore:remove-base-document-definition docdef = { uri-reference } path = { uri-reference } />
fcore:remove-member | <fcore:remove-member member-path = { uri-reference } path = { uri-reference } />
fcore:remove-ns-map | <fcore:remove-ns-map prefix = { prefixes } path = { uri-reference } />
fcore:remove-rdf-map | <fcore:remove-rdf-map object = { string } predicate = { string } subject = { string } path = { uri-reference } />
fcore:repo-text-reindex | <fcore:repo-text-reindex />
fcore:repo-text-search | <fcore:repo-text-search query = { string } />
fcore:rollback | <fcore:rollback />
fcore:session-data | <fcore:session-data key = { string } value = { string } <!-- Content: template --> />
fcore:set-acl | <fcore:set-acl access = { string } ident = { string } allowed = { "yes" | "no" } path = { uri-reference } />
fcore:set-content | <fcore:set-content base-path = { uri-reference } cdata-section-elements = { qnames } content-as-string = "yes" | "no" doctype-public = { string } doctype-system = { string } encoding = { string } indent = { "yes" | "no" } literal-content = "yes" | "no" media-type = { string } method = { qname } omit-xml-declaration = { "yes" | "no" } path = { uri-reference } standalone = { "yes" | "no" } version = { nmtoken } <!-- Content: template --> />
fcore:set-creation-params | <fcore:set-creation-params path = { uri-reference } <!-- Content: template --> />
fcore:set-document-definition | <fcore:set-document-definition docdef = { string } path = { uri-reference } />
fcore:set-imt | <fcore:set-imt imt = { string } path = { uri-reference } />
fcore:set-owner | <fcore:set-owner owner = { uri-reference } path = { uri-reference } />
fcore:set-reference | <fcore:set-reference reference = { uri-reference } path = { uri-reference } />
fcore:set-username | <fcore:set-username new-name = { string } path = { uri-reference } />
fcore:x-update | <fcore:x-update path = { uri-reference } <!-- Content: template --> />
fhttp:request-headers | <fhttp:request-headers />
fhttp:response-uri | <fhttp:response-uri uri = { uri-reference } />
frdf:add | <frdf:add o = expression p = expression s = expression scope = string-expression stmt-uri = string-expression type = expression />
frdf:complete | <frdf:complete o = expression o-flags = { "normal" | "regex" | "ignore-case" | "regex-ignore-case" } p = expression p-flags = { "normal" | "regex" | "ignore-case" | "regex-ignore-case" } s = expression s-flags = { "normal" | "regex" | "ignore-case" | "regex-ignore-case" } scope = string-expression scope-flags = { "normal" | "regex" | "ignore-case" | "regex-ignore-case" } stmt-uri = string-expression stmt-uri-flags = { "normal" | "regex" | "ignore-case" | "regex-ignore-case" } type = expression />
frdf:deserialize-and-add | <frdf:deserialize-and-add path = { uri-reference } base-path = { uri-reference } <!-- Content: template --> />
frdf:deserialize-and-remove | <frdf:deserialize-and-remove path = { uri-reference } base-path = { uri-reference } <!-- Content: template --> />
frdf:remove | <frdf:remove o = expression o-flags = { "normal" | "regex" | "ignore-case" | "regex-ignore-case" } p = expression p-flags = { "normal" | "regex" | "ignore-case" | "regex-ignore-case" } s = expression s-flags = { "normal" | "regex" | "ignore-case" | "regex-ignore-case" } scope = string-expression scope-flags = { "normal" | "regex" | "ignore-case" | "regex-ignore-case" } stmt-uri = string-expression stmt-uri-flags = { "normal" | "regex" | "ignore-case" | "regex-ignore-case" } type = expression />
frdf:versa-assign | <frdf:versa-assign name = { qname } query = { string } scope = { string } <!-- Content: template --> />
frdf:versa-query | <frdf:versa-query query = { string } scope = { string } <!-- Content: template --> />
frdf:visualize | <frdf:visualize graph-vis = { uri-reference } output-path = { uri-reference } map-name = { id } max-arcs = { number } namespaces = { string } resourcePath = { string } rotate = { "yes" | "no" } scoped = { "yes" | "no" } svg = { "yes" | "no" } uri-format = { string } <!-- Content: template --> />
futil:xml-rpc-invoke | <futil:xml-rpc-invoke method = { string } uri = { uri-reference } p1 = expression p2 = expression p3 = expression p4 = expression p5 = expression t1 = expression t2 = expression t3 = expression t4 = expression t5 = expression />

## Functions

### Function - fcore:as-dom

#### Function Syntax

unknown fcore:as-dom(path)

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.

### Function - fcore:delete-session-data

#### Function Syntax

unknown fcore:delete-session-data(key)

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

### Function - fcore:get-absolute-path

#### Function Syntax

unknown fcore:get-absolute-path(path)

Get the full path into the system, resolving aliases if needed

### Function - fcore:get-acl-by-key

#### Function Syntax

unknown fcore:get-acl-by-key(aclKey, path)

### Function - fcore:get-aliases

#### Function Syntax

unknown fcore:get-aliases(path)

Get a list of alias objects that reference this object

### Function - fcore:get-all-acl

#### Function Syntax

unknown fcore:get-all-acl(path)

### Function - fcore:get-all-document-definition-paths

#### Function Syntax

unknown fcore:get-all-document-definition-paths(path)

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

### Function - fcore:get-available-handlers

#### Function Syntax

unknown fcore:get-available-handlers(module)

### Function - fcore:get-available-modules

#### Function Syntax

unknown fcore:get-available-modules()

### Function - fcore:get-base-definitions

#### Function Syntax

unknown fcore:get-base-definitions(path)

### Function - fcore:get-content

#### Function Syntax

unknown fcore:get-content(path, encoding)

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

### Function - fcore:get-creation-date

#### Function Syntax

unknown fcore:get-creation-date(path)

Get the date the resource was created

### Function - fcore:get-creation-params

#### Function Syntax

unknown fcore:get-creation-params(path)

### Function - fcore:get-current-user

#### Function Syntax

unknown fcore:get-current-user()

Get the resource (path) for the current user

### Function - fcore:get-current-username

#### Function Syntax

unknown fcore:get-current-username()

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

### Function - fcore:get-derived-definitions

#### Function Syntax

unknown fcore:get-derived-definitions(path)

### Function - fcore:get-document-definition

#### Function Syntax

unknown fcore:get-document-definition(path)

### Function - fcore:get-groups

#### Function Syntax

unknown fcore:get-groups(path)

### Function - fcore:get-imt

#### Function Syntax

unknown fcore:get-imt(path)

Get the IMT of a resource

### Function - fcore:get-last-modified-date

#### Function Syntax

unknown fcore:get-last-modified-date(path)

Get the date the resource was last modified

### Function - fcore:get-member-paths

#### Function Syntax

unknown fcore:get-member-paths(group)

Returns, as a node-set of 'path' elements, the full paths to all user resources that are members of the specified group

### Function - fcore:get-metadata-resource

#### Function Syntax

unknown fcore:get-metadata-resource(path)

Get the string meta data of this resource

### Function - fcore:get-name

#### Function Syntax

unknown fcore:get-name(path)

Get the name of the resource.

### Function - fcore:get-ns-map

#### Function Syntax

unknown fcore:get-ns-map(path)

### Function - fcore:get-owner

#### Function Syntax

unknown fcore:get-owner(path)

Get the owner of the resource

### Function - fcore:get-parent

#### Function Syntax

unknown fcore:get-parent(path)

Get the parent container of this resource

### Function - fcore:get-raw-content

#### Function Syntax

unknown fcore:get-raw-content(path, encoding)

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

### Function - fcore:get-rdf-maps

#### Function Syntax

unknown fcore:get-rdf-maps(path)

### Function - fcore:get-reference

#### Function Syntax

unknown fcore:get-reference(path)

Get the URI that this resource references

### Function - fcore:get-size

#### Function Syntax

unknown fcore:get-size(path)

Get the size of the resource

### Function - fcore:get-user-data

#### Function Syntax

unknown fcore:get-user-data(key, path)

Gets property data associated with a user

### Function - fcore:get-user-data-keys

#### Function Syntax

unknown fcore:get-user-data-keys(path)

Gets the names of properties associated with a user

### Function - fcore:get-user-name

#### Function Syntax

unknown fcore:get-user-name()

### Function - fcore:get-user-or-group

#### Function Syntax

unknown fcore:get-user-or-group(name)

Given a user name, return the user resource path

### Function - fcore:get-username

#### Function Syntax

unknown fcore:get-username(path)

Get the user name given the path to a user resource. If the path is invalid or does not give a user object, '' is returned.

### Function - fcore:has-resource

#### Function Syntax

unknown fcore:has-resource(path)

Query if the system has a resource specified by the path

### Function - fcore:has-session

#### Function Syntax

unknown fcore:has-session()

See if this connection is in a session

### Function - fcore:hash-string

#### Function Syntax

unknown fcore:hash-string(rawString)

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

### Function - fcore:normalize-uri

#### Function Syntax

unknown fcore:normalize-uri(uri, base)

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

### Function - fcore:remove-user-data

#### Function Syntax

unknown fcore:remove-user-data(key, path)

Erases property data associated with a user

### Function - fcore:repo-path-to-uri

#### Function Syntax

unknown fcore:repo-path-to-uri(path)

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

### Function - fcore:resource-type

#### Function Syntax

unknown fcore:resource-type(path)

Get the resource type of the resource

### Function - fcore:session-data

#### Function Syntax

unknown fcore:session-data(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.

### Function - fcore:session-invalidate

#### Function Syntax

unknown fcore:session-invalidate()

Destroy the current session

### Function - fcore:set-user-data

#### Function Syntax

unknown fcore:set-user-data(key, value, path)

Sets property data associated with a user

### Function - fcore:uri-to-repo-path

#### Function Syntax

unknown fcore:uri-to-repo-path(uri)

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

### Function - fcore:verify-acl

#### Function Syntax

unknown fcore:verify-acl(aclKey, path, verifyTraverse)

Verify that the testAclIdent is in the acl list specified by the acl key for this object.

### Function - fhttp:get-query-args

#### Function Syntax

unknown fhttp:get-query-args()

fhttp:get-query-args() returns a node-set consisting of one 'requestParameters' element, containing one child element for each item in the HTTP request parameters, a.k.a. the query arguments (typically HTML form data). The HTTP server will have already decoded the parameters and made them available to the XSLT processor; this function merely provides access to that data as a node-set. The parameter name becomes the element name, and the value is the element's content. If there are multiple parameters with the same name, they'll manifest as separate elements.

### Function - fhttp:local-path

#### Function Syntax

unknown fhttp:local-path(path)

Given a repo path, returns a repo path that is relative to the HTTP handler's document root, if possible. Otherwise, returns the given path unchanged.

### Function - fhttp:local-uri

#### Function Syntax

unknown fhttp:local-uri(uri)

Given an ftss URI, returns a URI reference. The reference will be relative to the HTTP handler's document root.

### Function - frdf:any

#### Function Syntax

unknown frdf:any()

### Function - frdf:complete

#### Function Syntax

unknown frdf:complete(subj, pred, obj)

Runs a complete on the repository model, which matches patterns among the triples in the model. You provide whichever of the subject, predicate and object you'd like to match, and use the frdf:any() function as a wildcard. The return value is a generated node set which has one or more "Statement" elements, each with 5 children: "Subject", "Predicate", "Object", "StatementUri", "Scope" which represent the respective components of the RDF statement. for example: frdf:complete("http://spam.com", frdf:any(), frdf:any()) would return all statements with "http://spam.com" as the subjects.

### Function - frdf:contains

#### Function Syntax

unknown frdf:contains(subj, pred, obj)

Runs a conatins on the repository model, which matches patterns among the triples in the model. You provide whichever of the subject, predicate and object you'd like to match, and use the frdf:any() function as a wildcard. The return value is a boolean indicating whether or not a matching statement exists.

### Function - frdf:versa-query

#### Function Syntax

unknown frdf:versa-query(query, scope)

Perform a Versa Query as a function, return a node-set representing the outside list.

## Elements

### Element - fcore:add-acl

#### Element Syntax

<fcore:add-acl
access = { string }
ident = { string }
allowed = { "yes" | "no" }
path = { uri-reference } />

Add access for an given identifer and level to the ACL of a resource

### Element - fcore:add-alias

#### Element Syntax

<fcore:add-alias
alias = { uri-reference }
doc-def = { uri-reference }
path = { uri-reference } />

Adds an alias for this resource to the repository.

### Element - fcore:add-base-document-definition

#### Element Syntax

<fcore:add-base-document-definition
docdef = { uri-reference }
path = { uri-reference } />

Add a new document definition to a document definition's base defs.

### Element - fcore:add-member

#### Element Syntax

<fcore:add-member
member-path = { uri-reference }
path = { uri-reference } />

Adds a user or group to the specified group

### Element - fcore:add-ns-map

#### Element Syntax

<fcore:add-ns-map
prefix = { prefix }
uri = { uri-reference }
path = { uri-reference } />

Change the namespace mapping of this doc def.

### Element - fcore:add-rdf-map

#### Element Syntax

<fcore:add-rdf-map
object = { string }
object-is-resource = { "yes" | "no" }
predicate = { string }
subject = { string }
path = { uri-reference } />

Change the rdf mapping of this doc def.

### Element - fcore:change-password

#### Element Syntax

<fcore:change-password
path = { uri-reference }
new-password = { string } />

Changes the password of the specified user resource.

### Element - fcore:create-container

#### Element Syntax

<fcore:create-container
path = { uri-reference }
base-path = { uri-reference }
create-parents = { "yes" | "no" } />

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.

### Element - fcore:create-document

#### Element Syntax

<fcore:create-document
base-path = { uri-reference }
cdata-section-elements = { qnames }
docdef = { uri-reference }
doctype-public = { string }
doctype-system = { string }
encoding = { string }
imt = { string }
indent = { "yes" | "no" }
media-type = { string }
method = { qname }
omit-xml-declaration = { "yes" | "no" }
path = { uri-reference }
standalone = { "yes" | "no" }
type = { string }
version = { nmtoken }
<!-- Content: template -->
/>

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.

### Element - fcore:create-group

#### Element Syntax

<fcore:create-group
path = { uri-reference }
base-path = { uri-reference } />

Creates a new group with the specified path. A group is a set of users and other groups.

### Element - fcore:create-raw-file

#### Element Syntax

<fcore:create-raw-file
base-path = { uri-reference }
cdata-section-elements = { qnames }
content-as-string = "yes" | "no"
doctype-public = { string }
doctype-system = { string }
encoding = { string }
indent = { "yes" | "no" }
media-type = { string }
method = { qname }
omit-xml-declaration = { "yes" | "no" }
path = { uri-reference }
standalone = { "yes" | "no" }
version = { nmtoken }
<!-- Content: template -->
/>

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)

### Element - fcore:create-session

#### Element Syntax

<fcore:create-session
key = { string }
ttl = { number } />

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

### Element - fcore:create-uri-reference

#### Element Syntax

<fcore:create-uri-reference
path = { uri-reference }
base-path = { uri-reference }
imt = { string }
source-uri = { uri-reference } />

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.

### Element - fcore:create-user

#### Element Syntax

<fcore:create-user
password = { string }
username = { string }
base-path = { uri-reference } />

Create a new user in the system

### Element - fcore:delete-resource

#### Element Syntax

<fcore:delete-resource
path = { uri-reference } />

Delete this resource

### Element - fcore:inherit-acl

#### Element Syntax

<fcore:inherit-acl
access = { string }
path = { uri-reference } />

Set the inheritance ACL of a resource

### Element - fcore:login

#### Element Syntax

<fcore:login
password = { string }
user = { string }
failure-redirect = { string }
success-redirect = { string }
timeout-redirect = { string }
ttl = { number } />

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.

### Element - fcore:mark-temporary

#### Element Syntax

<fcore:mark-temporary
time-to-live = { number }
path = { uri-reference } />

Mark a resource as temporary

### Element - fcore:remove-acl

#### Element Syntax

<fcore:remove-acl
access = { string }
ident = { string }
path = { uri-reference } />

Remove the ACL from a resource

### Element - fcore:remove-alias

#### Element Syntax

<fcore:remove-alias
alias = { uri-reference }
path = { uri-reference } />

Remove an alias for this resource from the repository.

### Element - fcore:remove-base-document-definition

#### Element Syntax

<fcore:remove-base-document-definition
docdef = { uri-reference }
path = { uri-reference } />

Remove a document definition from a document definition's base defs.

### Element - fcore:remove-member

#### Element Syntax

<fcore:remove-member
member-path = { uri-reference }
path = { uri-reference } />

Removes a user or group from the specified group

### Element - fcore:remove-ns-map

#### Element Syntax

<fcore:remove-ns-map
prefix = { prefixes }
path = { uri-reference } />

Change the namespace mapping of this doc def.

### Element - fcore:remove-rdf-map

#### Element Syntax

<fcore:remove-rdf-map
object = { string }
predicate = { string }
subject = { string }
path = { uri-reference } />

Change the rdf mapping of this doc def.

### Element - fcore:repo-text-reindex

#### Element Syntax

<fcore:repo-text-reindex />

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

### Element - fcore:repo-text-search

#### Element Syntax

<fcore:repo-text-search
query = { string } />

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

### Element - fcore:rollback

#### Element Syntax

<fcore:rollback />

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

### Element - fcore:session-data

#### Element Syntax

<fcore:session-data
key = { string }
value = { string }
<!-- Content: template -->
/>

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.

### Element - fcore:set-acl

#### Element Syntax

<fcore:set-acl
access = { string }
ident = { string }
allowed = { "yes" | "no" }
path = { uri-reference } />

Reset the ACL for a resource, and then optionally add access for an given identifer and level to the ACL of a resource

### Element - fcore:set-content

#### Element Syntax

<fcore:set-content
base-path = { uri-reference }
cdata-section-elements = { qnames }
content-as-string = "yes" | "no"
doctype-public = { string }
doctype-system = { string }
encoding = { string }
indent = { "yes" | "no" }
literal-content = "yes" | "no"
media-type = { string }
method = { qname }
omit-xml-declaration = { "yes" | "no" }
path = { uri-reference }
standalone = { "yes" | "no" }
version = { nmtoken }
<!-- Content: template -->
/>

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

### Element - fcore:set-creation-params

#### Element Syntax

<fcore:set-creation-params
path = { uri-reference }
<!-- Content: template -->
/>

Change the creation params of a document definition. The content of the fcore:set-creation-params element is a template for the new creation params in serialized format.

### Element - fcore:set-document-definition

#### Element Syntax

<fcore:set-document-definition
docdef = { string }
path = { uri-reference } />

Change the Document Definition of a XML document

### Element - fcore:set-imt

#### Element Syntax

<fcore:set-imt
imt = { string }
path = { uri-reference } />

Change the IMT of a resource

### Element - fcore:set-owner

#### Element Syntax

<fcore:set-owner
owner = { uri-reference }
path = { uri-reference } />

Change the owner of a resource

### Element - fcore:set-reference

#### Element Syntax

<fcore:set-reference
reference = { uri-reference }
path = { uri-reference } />

Change what a URI reference references.

### Element - fcore:set-username

#### Element Syntax

<fcore:set-username
new-name = { string }
path = { uri-reference } />

Set the username of a user resource.

### Element - fcore:x-update

#### Element Syntax

<fcore:x-update
path = { uri-reference }
<!-- Content: template -->
/>

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.

### Element - fhttp:request-headers

#### Element Syntax

<fhttp:request-headers />

### Element - fhttp:response-uri

#### Element Syntax

<fhttp:response-uri
uri = { uri-reference } />

### Element - frdf:add

#### Element Syntax

<frdf:add
o = expression
p = expression
s = expression
scope = string-expression
stmt-uri = string-expression
type = expression />

Adds statements to the repository model. The subject, predicates and objects can be strings or node sets node sets are converted to a list of strings by taking the string value of each item. String values are treated a list with one string. The cartesian product of statements that come from the list of subject, predicate and object strings are all added to the model using the given scope and statement URI.

### Element - frdf:complete

#### Element Syntax

<frdf:complete
o = expression
o-flags = { "normal" | "regex" | "ignore-case" | "regex-ignore-case" }
p = expression
p-flags = { "normal" | "regex" | "ignore-case" | "regex-ignore-case" }
s = expression
s-flags = { "normal" | "regex" | "ignore-case" | "regex-ignore-case" }
scope = string-expression
scope-flags = { "normal" | "regex" | "ignore-case" | "regex-ignore-case" }
stmt-uri = string-expression
stmt-uri-flags = { "normal" | "regex" | "ignore-case" | "regex-ignore-case" }
type = expression />

### Element - frdf:deserialize-and-add

#### Element Syntax

<frdf:deserialize-and-add
path = { uri-reference }
base-path = { uri-reference }
<!-- Content: template -->
/>

Deserializes an RDF document into statements, and adds them to a scope The content of the frdf:deserialize-and-add element is a template for the RDF/XML source from which the statements are parsed.

### Element - frdf:deserialize-and-remove

#### Element Syntax

<frdf:deserialize-and-remove
path = { uri-reference }
base-path = { uri-reference }
<!-- Content: template -->
/>

Deserializes an RDF document into statements, and removes any statements in the given scope with matching triple values. The content of the frdf:deserialize-and-remove element is a template for the RDF/XML source from which the statements are parsed.

### Element - frdf:remove

#### Element Syntax

<frdf:remove
o = expression
o-flags = { "normal" | "regex" | "ignore-case" | "regex-ignore-case" }
p = expression
p-flags = { "normal" | "regex" | "ignore-case" | "regex-ignore-case" }
s = expression
s-flags = { "normal" | "regex" | "ignore-case" | "regex-ignore-case" }
scope = string-expression
scope-flags = { "normal" | "regex" | "ignore-case" | "regex-ignore-case" }
stmt-uri = string-expression
stmt-uri-flags = { "normal" | "regex" | "ignore-case" | "regex-ignore-case" }
type = expression />

Removes statements to the repository model. The subject, predicates and objects can be strings or node sets node sets are converted to a list of strings by taking the string value of each item. String values are treated a list with one string. The cartesian product of statements that come from the list of subject, predicate and object strings and that match the given scope and statement URI are all removed from the model.

### Element - frdf:versa-assign

#### Element Syntax

<frdf:versa-assign
name = { qname }
query = { string }
scope = { string }
<!-- Content: template -->
/>

Execute a Versa query and assign the result to a Versa variable, for use in further queries. The variable becomes bound in the Versa context for the current stylesheet invokation, and thus will be defined on all Versa queries performed subsequently, through <frdf:versa-query> or <frdf:versa-assign>. The content of the frdf:versa-assign element is a template for the extra namespace mappings for the query (see /ftss/dashboard/NsMappings.xml for an example of the xml format). For example, if you have the following: <frdf:versa-assign query="type(rdfs:Class)" name="classes"/> You can later execute <frdf:versa-query query="$classes - rdfs:label -> *"/>

### Element - frdf:versa-query

#### Element Syntax

<frdf:versa-query
query = { string }
scope = { string }
<!-- Content: template -->
/>

Execute a Versa query and put the results in serialized XML form to the XSLT processor output. The content of the frdf:versa-query element is a template for the extra namespace mappings for the query (see /ftss/dashboard/NsMappings.xml for an example of the xml format). The form of the Versa output is as documented in http://rdfinference.org/versa-xml.

### Element - frdf:visualize

#### Element Syntax

<frdf:visualize
graph-vis = { uri-reference }
output-path = { uri-reference }
map-name = { id }
max-arcs = { number }
namespaces = { string }
resourcePath = { string }
rotate = { "yes" | "no" }
scoped = { "yes" | "no" }
svg = { "yes" | "no" }
uri-format = { string }
<!-- Content: template -->
/>

This extension element uses GraphViz to generate a diagram of a given resource, a set of resources in a particular scope, or of the entire system model. It adds an HTML imagemap (a chunk of text that can be placed in a MAP element) to the result tree, and has the side effect of generating in the repository an SVG or JPEG image resource representing the corresponding diagram. output-path specifies the repo path of the diagram to generate. If the resource exists already, its content will be overwritten. If provided, resourcePath must to refer to either a specific resource in the system model or an RDF document in the repository. If it refers to an RDF document, then all RDF statements with that document's URI as their scope will be graphed. If the resourcePath refers to any other kind of resource, then only statements about it will be graphed. If no resourcePath is specified, then the entire system model will be graphed. The image map text placed in the result tree uses the uriFormat string to generate (by appying the uris of all resources against this string) the links for all resources in the image. imagemap information is generated and returned only if the uriFormat string is specified. Most RDF graphs are width heavy and the visualizer can be told to rotate the image 90 degrees which can be helpful far larger graphs (which could great widths). This is specified by the rotate attribute. If present, the graph is rotated, otherwise it isn't. The max-arcs attribute specifies the maximum number of arcs. If the graph requires more arcs, then nothing will be generated at all. This element can also take a versa query result as its child nodes. In this case, all the resources in the result are graphed and resource-path is ignored.

### Element - futil:xml-rpc-invoke

#### Element Syntax

<futil:xml-rpc-invoke
method = { string }
uri = { uri-reference }
p1 = expression
p2 = expression
p3 = expression
p4 = expression
p5 = expression
t1 = expression
t2 = expression
t3 = expression
t4 = expression
t5 = expression />

Invoke an XML-RPC server at a remote URI (Requires Python 2.2 or above) There are 5 attributes, p1, p2... which are used for the positional arguments to the remote method [this will be made less kludgy soon] Each one is an expression which follows the following conversion rules from the XPath data model: string -> string number -> floating-point number boolean -> boolean node set -> array of strings You can also coerce the value to a certain type by using an attribute of the form t1, t2,... corresponding to the pN attribute with one of the following string values: INT DOUBLE STRING BOOLEAN The return value is converted into an XML fragment representation, which is sent to output. string -> <String>[value]</String> floating-point number -> <Double>[value]</Double> boolean -> boolean <Boolean>["true" or "false"]</Boolean> array -> <Array>[sequence of child elements as above, according to array elements]</Array> An example of an array: <Array> <String>a string</String> <Float>123.4</Float> <Int>1234</Int> <String>another string</String> </Array> This means that in order to access a remote method obj.spam('eggs', 3) On a remote server at http://spam.com/xmlrpcserver And save the result of XSLT variable "monty", you can use the following XSLT snippet: <xsl:variable name="monty"> <futil:xml-rpc-invoke uri="http://spam.com/xmlrpcserver" method="obj.spam" p1="'eggs'" p2="3" t2="INT"/> </xsl:variable> No type coercion is used for p1 because XSLT string are generally unambiguous in converting to XML-RPC. However, the second param could be integer or double, so it is coerced (default is double). Beware that if an array is returned, you might need to use the exslt:node-set function to convert from result tree fragment to node set.