Containers is a way to limit area of usage of some style/scope/label by specific parent (surrounding) style.

The logic is following:

  1. You have styles. Styles are described by Blocks, Keywords, and Words conditions and applied to some interval of the text (text block).
  2. Styles can be referred by style id. If id attribute is not defined HippoEDIT will use value of name attribute as id.
  3. When you define container (or containers) for Scope or another schema object, you allow this Scope, Style or Label etc to be recognized only in the style specified by container id.

For example this mean:

<Scope open="{" close="}">
   <containers open="test_container_name"/>

Scope with open tag “{” allowed only in the style “test_container_name”. If it would be found in some other style, it would be skipped. If you do not specify containers, HippoEDIT assumes that this object (scope, style or label) allowed only in normal style (style with id = normal, defined in def_spec.xml).

For objects as Scope and Style you can define containers as for open part, as for close part (for scopes also for middle part). For example CSS block in HTML can be started in normal style of HTML code and can be closed inside CSS normal or comment style.

   <Close id="css:normal"/>
   <Close id="css:comment"/>

If you do not define open container, it would be normal style of current language.

If you want to refer to a style from another syntax schema, you can do this as well, by giving syntax id before style id separated with “:” :

<Style id="style" name="CSS" include="css:normal" ...

This is including of the CSS block in HTML syntax schema.