XSL is used in onion for the following tasks:

  • Delivery of literal contents (e.g. XHTML, text)
  • XML-based aggregation models
  • Control of binary outputs

These tasks form the three method types Literal, Xml and binary, which are described in the following chapters.

A method has - depending on the type - a great number of possible settings for access protection, buffer mechanisms (caching), automatic recalculation, post-processing and meta information.

Access protection

The access protection relates to three zones:

  • Internal
    This method can only be called by other methods located in onion. External access is prevented.
  • Protected
    This method can also be called for the internal use of .NET applications.
  • Public
    This method can be executed outside of the Engine.

Buffer (caching)

onion has a great number of caching options, which can improve the delivery speed and the incremental calculation of contents. The caching is not limited to the mere acquisition of source data, but can be used in every application level. The following levels can be outlined here:

  • Source data
    Data can be acquired via the cache and is thus available for further calculations and for other methods which access the same source data. This reduces queries to the data server.
  • Method results
    The execution result of a method can be buffered for reuse.
  • Application methods
    The execution results of .NET methods can be buffered for reuse.

All calculated results are always connected with the underlying source data. This means that changing the source data leads directly to the expiry of the buffered results that are based on it. In addition, the time-based expiry is supported by results in order to make a time-controlled display of contents possible without switching to the dynamic generation.

The caching can therefore improve the performance and utilisation of the systems involved. A general rule: The more buffered results, the higher the memory load on the server is. In order to make relieving the main memory possible, the following storage media can be selected:

  • Main memory
    The data created is kept directly in the main memory.
  • Hard drive
    The buffered data is buffered on the hard drive of the server. Any access to cached data leads to a file access.

Automatic recalculation

This process…


The onion post-processing model is the basis for cached contents with a dynamic portion. This enables a visitable page, on which a continuously updated stock ticker is placed for example, to be completely cached. A further example is the support of cookieless sessions, which lead to all links on the page being given the session ID of the user. Lastly, the application integration of ASP.NET applications, which must always be executed in the context of the user, is based on this model.