XSLT
Overview:
Reptile content generation is done via multiple pass XSLT transforms. This allows us to
abstract certain operations into individual stylesheets.
Any complex operation is extended via the use of Xalan XSLT extensions.
This allows us to tightly incorporate Java or other scripts with each leg of
content generation.
XSLT rendering via sequences
Most reptile content generation is done via a series of XSLT transformations
known as sequences. These act as a stack of stylesheets with an input and output
as XML. The input is usually read from a URL as a Java InputStream passed to
Xalan.
The output is formed from the multiple transformations. This is collected and
then passed to the requester.
All sequences are registered in 'resource:/xml/sequence-dispatch.xml'. This is
parsed by Reptile when given a sequence that needs to be dispatched.
XML Content Controls
All remote content (RSS, etc) is passed through a content XSL which pulls down
the URL via a Panther Proxy and
applies the correct stylesheet. The proxy is used so that we can buffer remote
content and it can also access "resource:" URIs directly from the WAR. The
correct stylesheet is chosen based on content type and is responsible for
generating XML with the correct
structure.
|