About Askemos · design notes · documentation · news · download · On CD · thanks · forum · support
ActionDocument · CoreAPI · DublinCore · MoneyDemo · OID · TheReflection · WhatIsTime · XSQL
AskemosServer

XSLTMethodExamples

Method Overview

These examples introduce the use of three basic virtual machines as they come with Askemos. The initial setup process installs the corresponding ActionDocument's under public, public/private and public/xslt-method.

public
The public method rejects all modification requests implementing an invariant. Upon read requests the data is delivered a It is most suited for replication as there are no update problems possible. As it is an invariant it's used to base the system protection on it.
private
This is the opposite of a public place. It allow (minus insufficient permissions) to change the data, content type and even the DublinCore slots date and creator. Hence it's practical, but not suited for documents in the legal sense.
xslt-method
The xslt-method evaluates the stylesheet at the place to produce outgoing signals and new state (see CoreAPI). This method is always reflective, as the state includes the xslt program code, and there is no way to get around it if the code at the place doesn't have special support.[1]

Note: the examples given here are stored in the place, which is linked as /stylelib in the repository created from the distribution. The links at this page go to the stylelib at askemos.org, because it's not possible to predict which oid that place will have in you installation. If you can find the overview here (depends on your setup, e. g., you installed the distribution and use it as user 'gonzo') then you can use the embedded forms. (also note that the formatting might be strange as described there).

Preface: Creating Places

The users login page has a form (inactive source here), which allows to fetch data from any addressable object (using a certain soap message body) and create a place from it. As distributed the form points into the stylelib sending a form to apply a template to extract just the code. The new place has public/xslt-method as ActionDocument. Usually you change these values to your needs.

Hello World

The inevitable hello world example: you simply write the html and create a place from that data.

This example is actually a bad example for the xslt method. It works, but using the evaluating xslt-method, is an overkill for invariant documents. Those documents are better created using the public method, which rejects all modifications

Sending Messages

The most simple example is send to self a test, which sends an empty message to the very same place. Another example is part of the simple rights management interface (all includes resolved here), find the reply here

Ownership Transfer

The well commented MoneyDemo (source) illustrates ownership transfer but give a lot of other hints.

.. and than find it here.

Unfortune: it's not of much use until you have a few users already.

Reflexive Changing the document at place

Actualy it's not the best practice to use reflective techniques to keep track of state. But as a proof of concept that way was used quite a lot. The editor allows you to edit text in a web form or alternativle use the file upload (which let's you create non-xml (picture) content with ease.

.. and than find it here.

The editor was one of the first apps ever written and sometimes it's referenced as "msged", where you can directly link it here:

.. and than find it here.

See alsothis control as a striped down version focusing on variable modification.

Using the Clock

Note: the way the clock has to be configured is a temporary solution, which might change in future versions.

To use the system clock, assign the OID of the designated place to $clock-oid. The place will than receive signals. See this example how to make use of it. When it come to time, beware of pitfalls.

Using XSQL

The xsql test is a simple interface to send sql queries. See XSQL for preconditions to use it.

.. and than find it here.

Using Perl compatible regular expressions

The pcre test is a simple interface to test Perl compatible regular expressions.

.. and than find it here.

A more complex example

The basics of a web calendar.





border
last modification: Mon, 30 Oct 2006 19:36:47 +0100
authors: jfw,
document identifier: A849640f672ed0df0958abc0712110f3c
delivered to public at Sat, 22 Nov 2008 12:30:31 +0100
short comments


rss

pdf :: context view

search



02 Mai 2006AskemosTopMenu
18 Nov 2008StorageAdaptor
18 Nov 2008PStoreStorageAdapt
18 Nov 2008OperationTips
15 Nov 2008PCRE
04 Nov 2008ProgrammingLanguag
01 Okt 2008SystemRequirements
09 Sep 2008RelatedProjects
23 Jul 2008ProjectsOnThePlate
23 Jul 2008ModuleStructure05
17 Jun 2008NEWS
17 Jun 2008HTML
17 Jun 2008ACM
22 Mai 2008HTTP
22 Mai 2008BOSH
10 Mai 2008AskemosBibliograph
10 Mai 2008JerrysDreamAbstrac
20 Apr 2008XSLT
11 Mar 2008CodingStyle
10 Mar 2008
09 Mar 2008MIMEConverter
BSD
07 Mar 2008XML
06 Mar 2008SRFI
01 Mar 2008RFC4810
01 Mar 2008RFC4998
01 Mar 2008KondratieffWerk
04 Jan 2008service-level
04 Jan 2008NameSpaceDSSSLinde
24 Jun 2004KommunikationsInfr
BOINC






Add


About Askemos · design notes · documentation · news · download · On CD · thanks · forum · support
Web Design by Schwill Dresden