SourceForge.net Logo







Using XDFLengine

Command Line Executable: XDFLrun

The XDFLrun executable simply makes the library available in the form
of a command-line executable.
It is used in the following manner:


XDFLrun <arg1>=<val1> <arg2>=<val2> ... <argn>=<valn>

Arguments:
        script          : XDFL script to execute. (required)
        init            : Init XDFL script to execute before processing main script.
        input           : File to read as input data of script. If not provided, input data is read from stdin.
        output          : File to wite as output data of script. If not provided, output data is written to stdout.
        log             : Log file name. If not provided, log is written to stdout.
        encoding                : Character encoding used.
        other args provided as argname=argvalue are available wiwthin the script as ARG.argvalue values.

The init file is a xdfl script used to initialize XDFLengine:
    - load the streamer modules
    - init application constants
    - ...


It is possible to specify as many arguments as need be, these
arguments then being loaded as variables in the processor.

Web Server Extensions: XDFLisapi and XDFLfcgi

Using XDFLengine as a web server extension

The XDFLengine is available as a web server extension for both IIS and
Apache. Although the web servers , the type of extension, and the
installation procedure are different, their principle, configuration
and usage are the same.

Writting XDFL scripts for web extensions

Writting scripts for the web extension is quite the same as for the
command line utility, the command line arguments being replaced by the
URL arguments : all parameters given on the URL are loaded as named
values in the script context. The key differences are :
- There is no input argument : the xdfl  script is called directly by
the URL and parsed by the extension thanks to the web server
configuration.
- Web server variables can be loaded as named values in the script
context according to the configuration.

Configuration

The extension expects to find a config.xdfl file which contains
configuration data.
The location of this file differs for XDFLisapi and XDFLfcgi (see
installation sections)
This file must produce some named values which will give the extension
its configuration parameters.

Initialisation

Beside the configuration file, the extension expects to find an
initialisation file, init.xdfl, in the same directory. This file is
executed once before the execution of the first request and  can be
used for vaious initilisation tasks, especially through the use of the
underscore-prefixed XDFL tags (static nodes) which can set the static
state of the extension.

 

Installation of XDFLisapi

The following procedure permits to install XDFLisapi as an ISAPI
extension on IIS4 or IIS5 web server,
to interpret the files with the .xdfl extension. The procedure is
given for Windows 2000 (IIS5) but is not very diffrent for IIS4.

1/  Copy the XDFLengine_win32.1.0.dll and XDFLisapi_win32.1.0.dll is the /WINNT/SYSTEM32/
directory
2/  Open the IIS administration console.
3/  Create a new virtual directory with the script execution
permissions
4/  Open the property sheet for this virtual directory and go to the
Virtual Directory Tab.
5/  Open the configuration Window (click the 'Configuration...' Button),
and go to the Application Mapping tab.
6/  Click Add... to append a new isapi extension to the virtual
directory
7/  Give the path to the XDFLisapi DLL (C:\WINNT\SYSTEM32\XDFLisapi.dll)
    Declare it for the .xdfl extension, for the GET and POST verbs
    Declare it as a script engine and allow IIS to check for the file
    existence.
8/  All files with the xdfl extension in the virtual directory will
now be interpreted by XDFLisapi.dll when called through the web
server.

It is then better to declare your IIS application for Medium or
High isolation level.

The config.xdfl and init.xdfl  files are expected at the root of the
virtual directory.

Installation of XDFLfcgi

A sample apache application is given in the sample
see the samples/sample_apache subdirectory

Copyright (c) XDFLengine 2004