From EXPath

Revision as of 01:26, 20 February 2010 by FGeorges (Talk | contribs)
Jump to: navigation, search

The webapp module provides a way to write web applications directly in XSLT, XQuery and/or XProc. The homepage of the module is: http://expath.org/modules/webapp/. This module is defined by first looking at the existing and playing with a toy implementation, before writing down a spec. This page gather several observations as well as drafts. There are also specific info for the implementation for Saxon and Calabash, using Java Servlets.

Some notes can also be found in Florent Georges's wiki.

Servlet definition

A servlet is a component that takes a request and a context as input, and provides a response as output. The request is represented by an element srv:request and a sequence of zero or more request bodies. The context is represented by an element srv:application and an element srv:servlet. The response is represented by an element srv:response and a sequence of zero or more response bodies.

A servlet can be implemented using one of various technologies. Each kind of servlet has its own rules for receiving requests and providing responses. The available servlet kinds are:

  • an XPath function (provided by an XQuery library module, a stylesheet, or any other implementation-specific means);
  • an XSLT named template;
  • an XQuery main module;
  • an XSLT stylesheet;
  • an XProc pipeline (and a step type?).
Personal tools