All resources All frames

# SSIFrame

The SSI frame implements server-side parsing of HTML documents. Inside an SSIFrame-indexed file, any comment of the form `<!--#commandName param1=val1 param2=val2 ... paramn=valn -->` will be interpreted as a command. Commands are looked up in an instance of the class supplied in the registryClass attribute. This class must be a subclass of the abstract class org.w3c.jigsaw.ssi.commands.CommandRegistry. Commands are implementations of the Command interface or the ControlCommand interface.

If no command registry is specified, the resource will default to org.w3c.jigsaw.ssi.commands.DefaultCommandRegistry, which incorporates the most commonly used commands (including a set of commands analogous to the directives used by the NCSA server SSI module.)

The replies from each of the commands ("partial replies") are merged into a global reply. A Content-Length header will be emitted, provided that each of the commands emits one.

The following variables are always defined initially, independent of the command registry used:

- `Boolean secure`: the value of the secure attribute at the time of the request.
- `Integer maxDepth`: the value of the maxDepth attribute at the time of the request.
- `Integer depth`: the current include nesting depth.
- `CommandRegistry registry`: the current command registry.

Please note that both the CommandRegistry base class and the Command interface are likely to change in future releases.

## Known Bugs / Limitations

- In EchoCommand, GMT dates are not formatted using the datefmt config variable (instead, they're always formatted in "Java format").
- Validation using entity tags is not supported (yet).
- There is no support of a customized failure message in DefaultCommandRegistry.
- Commands have no option of determining their own persistency format. This could give better performance for some commands.
- Not all the headers from partial replies are merged. (It doesn't really make sense for some).

## Inherits

The SSIFrame class inerits from the following classes:

- Resource
- FramedResource
- ResourceFrame
- ProtocolFrame
- HTTPFrame

## Attributes description

The SSIFrame defines the following attributes:

- maxDepth
- secure
- registryClass

`maxDepth`

semantics
  The maximum depth of recursive document inclusion. Every time a document is included, a counter is increased. If this count gets to be equal to maxDepth, any further inclusion commands will be ignored. (Note that whether or not a command qualifies as an "inclusion command" is completely dependent on the command registry being used). If set to 0, no recursion limit will be enforced.
type
  This attribute is an editable IntegerAttribute
default value
  This attribute defaults to 10.

`secure`

semantics
  If true, only secure commands will be permitted. The definition of "secure" is fully dependent on the command registry used. In the case of the DefaultCommandRegistry, all commands except for exec are considered secure.
type
  This attribute is an editable BooleanAttribute
default value
  This attribute defaults to true.

`registryClass`

semantics
  The class that the command registry is to be an instance of. It must be a subclass of org.w3c.jigsaw.ssi.commands.CommandRegistry.
type
  This attribute is an editable ClassAttribute
default value
  This attribute defaults to org.w3c.jigsaw.ssi.commands.DefaultCommandRegistry.

Jigsaw Team
$Id: org.w3c.jigsaw.ssi.SSIFrame.html,v 1.3 1998/03/27 08:24:08 bmahe Exp $