Passing FSI parameters using HTTP queries

Besides creating individual XML configuration files to pass parameters to FSI Viewer, you can as well use HTTP queries attached to the FSI Viewer URL. This is especially important when using large numbers of images.
Let’s look at a small example to explain what this is all about:


Instead of using this configuration file, you could pass the same parameters by adding the following query to the
movie attribute of the <OBJECT> tag
and the
src attribute of the <EMBED> tag:

The format of these HTTP queries can be described in short by these 3 rules:

  • Each query starts with ‘?
  • Parameter names and parameter values have to be separated by ‘=
  • Multiple parameters have to be concatenated by ‘&

A typical query looks like this:

Please note:

As the query is part of the URL, not all characters can be used inside ParameterValues.
In case you have to use these invalid characters (like ‘&’ or ‘=’) you have to encode these characters.
This is, replacing the character by it’s hexadecimal ID inside the ASCII table prefixed with the ‘%’ character.
Therefore ‘&’ has to be given as ‘%26’ and ‘=’ as ‘%3D’.
Most programming and scripting languages provide methods for this purpose:

  • JavaScript: escape()
  • PHP: rawurlencode()
  • Perl: URI::Escape
  • ASP: Server.URLEncode()

Additional Rules for FSI Parameters and HTTP Queries

As HTTP queries only provide a single dimension by design, while XML configuration files describe a tree-like structure, the following rules have to be followed to overcome this limitation:

  1. You have to prefix parameters in HTTP queries with the name of the corresponding parameter group ( e.g. ‘FPX’ or ‘Viewer’).
    This is why in the previous example ‘ImagePath=somefolder/image.fpx‘ is being used instead of ‘Src=somefolder/image.fpx‘.
    The only exception to this is the <Options> group. Parameters belonging to this group do not require a prefix.
  1. Modifying plug-in attributes can be achieved by passing the attribute name prefixed with the plug-in name,
    e.g. ‘ZoomMeter_color=FF0000‘ to set the color attribute of the ZoomMeter plug-in to FF0000.