Just a second...

Server-side processing

A basic level of server-side processing can be utilized with any file hosted on the Diffusion™ web server that has a text mime type and JavaScript®.

There are three server-side tags: Include, Publisher and Topic Data. These tags are stored in HTML comments so as to not interfere with normal HTML.

Include Tag

Include stubs load the file specified in the file attribute and are loaded as is into the parent HTML document. They do not necessarily have to be valid HTML. They can be positioned anywhere within the HTML file.

These includes are synonymous with #Include statements of ANSI C.

Below is an example of the syntax:

<!--@DiffusionTag type="Include" file="stub.html" -->

Include files can be nested so an include file can contain an include tag

Publisher tag

Publisher tags enable a publisher to interact with the web page during the serving process. Again these tags can appear anywhere within the HTML document. In the case below the publisher method processHTMLTag of the Trade publisher is called with the tag argument of table The publisher can return a String of HTML that is inserted into the document at the position of the tag and the tag is removed. The processHTMLTag method is also called with the HTTP Request, although the request cannot be written to. Below is an example of the syntax
<!--@DiffusionTag type="publisher" publisher="Trade" tagid="table" -->

TopicData

Topic data tags allow for String, Int64 and Double items to be rendered in the HTML page. Again these tags can appear anywhere within the HTML document. The following example shows the syntax:
<!--@DiffusionTag type="TopicData" name="Assets/FX/EURUSD/O" -->

HTTP listener

Publishers can listen to all file HTTP requests by registering as a HTTPRequestListener. This exposes the interface
void handleHTTPRequest(HTTPVirtualHost virtualHost,HTTPRequest request)
This enables for more detailed statistics to be captured from the HTTP request