Go to the first, previous, next, last section, table of contents.


LaSt engine outputs

General output format

The output of the LaSt engine is normally only the HTML result. In many cases one wishes more extensive outputs, however, and this can be obtained by setting the `output' flag to `full'. Whenever in full outputs mode, the outputs will all be within a `last' environment. This will contain all choices made, and also all error messages and warnings issued during the processing. A small example of full outputs is shown below.

<last>
  <warning>couldn't find next default value for 'width'</warning>
  <choices>
    ... the full set of choices made ...
  </choices>
  <output>
    ... HTML output here ...
  </output>
</last>

Note that the `<last>' environment is well-formed XML, whereas the HTML contained within the `<output>' environment is not. Program parsing the LaSt engine outputs must be able to handle this in some way, or treat the contents of the `<output>' environments as pure text, as most specialized XML parsers don't support some parts of the HTML syntax.

The HTML outputs

Normally the outputs from the LaSt engine consist only of one single file, in which case the output will be given as in the earlier example. In some cases though, the LaSt rules may generate multiple page output, that will result in several `<output>' environments. In this case, all `<output>' environments will have a `file' attribute, naming that specific file. This is demonstrated in the example below.

<last>
  ... choices, etc ...
  <output file="file1.html">
    ... HTML code ...
    <a href="file2.html">Next</a>
    ... More HTML code ...
  </output>
  <output file="file2.html">
    ... Even more HTML code ...
  </output>
</last>

As seen in the example above each file may also contain relative references to any one of the other files, which implies some restrictions on presenting the web pages to the browsers. Normally this should be possible to solve by using URLs like http://www.some.org/cgi-bin/radioweb.cgi/favorite_artist/, where a CGI program is responsible to parse the last part of the document path.

Errors and warnings in output

If the `output' flag were set to `full', and there were errors or warnings issued during the LaSt engine processing, they will all be present in the outputs. The error messages will be given in `<error>' environments, and the warnings in `<warning>' environments, which is illustrated in the example below.

<last>
  <error>some error message</error>
  <warning>some warning message</warning>
  ... other stuff ...
</last>

The text inside the <error> or <warning> environments describe the problems encountered. No `<', `>' or entity characters (`&xxx;') will be used, and thus there is no special need for decoding these strings in any way.

The choices made

The output of the choices will basically be the same as in the input choices structure. There are three minor differences, however; the options will not contain any `after' or `before' attributes, the options may contain `note' attributes, and all available options will be specified with a `value' attribute. Each object in the RadioWeb document will be specified in it's own `<layout>' environment, containing the full set of choices made. This is also shown in the example below.

<choices>
<layout id="object1" value="2">
<option name="cellpadding" value="0"/>
<option name="cellspacing" value="3"/>
<option name="width" value="100%" note="failed"/>
<option name="border" value="0"/>
<option name="bgcolor1" value="white"/>
<option name="fgcolor1" value="black"/>
<option name="bgcolor2" value="black"/>
<option name="fgcolor2" value="white"/>
</layout>
<layout id="object2" value="0" note="failed">
</layout>
</choices>

In the example above the LaSt engine inputs have specified a next or previous value of `width' that was outside the range of default values. Also out of range was the given layout value for `object2'. The outputs thus contains two `note="failed"' attributes to mark these failures. Note also that if options were specified in the input that were not used during the layout and styling process, they will still be present in the output.

When a layout fails, the value returned is always set to `0', which results in a plain output of the raw data, without any kind of layout or styling. In the case of options out of range though, the old value is kept without being changed.


Go to the first, previous, next, last section, table of contents.