The <importBase> Element

Definition and Usage

The <importBase> element allows for incorporating an entity base (represented by <connectorBase>, <regionBase>, <descriptorBase>, <ruleBase> or <transitionBase> elementsdefined in an external document) to another already-defined base. ItsdocumentURIattribute refers to a URI corresponding to the NCL document containing the base to be imported. The alias attribute specifies a name to be used as prefix when referring to elements of this imported base. The reference must have the format: alias#element_id.

The import operation is transitive, that is, if baseA imports baseB that imports baseC, then baseA imports baseC. However, the alias defined for baseC inside baseB is not considered by baseA.

The following constraints must be satisfied:

  • the <descriptorBase> element may have a child <importBase> element referring to a URI corresponding to another NCL document containing the descriptor base to be imported and nested. When a descriptor base is imported, the region base, the transition base and the rule base, when present in the imported document, are also automatically imported to the corresponding region and rule bases of the importing document;
  • the <connectorBase> element may have a child <importBase> element referring to a URI corresponding to another connector base to be imported and nested;
  • the <transitionBase> element may have a child <importBase> element referring to a URI corresponding to another transition base to be imported and nested;
  • the <ruleBase> element may have a child <importBase> element referring to a URI corresponding to another NCL document containing the rule base to be imported and nested;
  • the <regionBase> element may have a child <importBase> element referring to a URI corresponding to another NCL document containing the region base to be imported and nested. As the referred document URI can have more than one region base, the base to be imported must be identified by assigning its idvalue to the baseId attribute of the <importBase> element. On importing a <regionBase>, an attribute named region may be specified within the <importBase> element. When present, this attribute identifies the id of a <region> element declared in a <regionBase> element of the host document (the document that does the importing operation). As a consequence, all child <region> elements of the imported <regionBase> shall be considered as child <region> elements of the region referred by the <importBase>’s region attribute. If not specified, the child <region> elements of the imported <regionBase> shall be considered direct children of the host document <regionBase> element.

Syntax

Element Attributes Content Parent
<importBase> alias, documentURI, region, baseId <ruleBase> or <transitionBase> or <regionBase> or <descriptorBase> or <connectorBase>

Attributes

Name Value Description
alias It may receive any string value that begins with a letter or an underscore and that only contains letters, digits, “.”, and “_”. The alias attribute specifies a name to be used as prefix when referring to elements of the imported base. The alias value must be unique in a document ands its scope is constrained to the document that has defined the alias attribute.
documentURI URI. The documentURI attribute is the locator for the NCL document from where the base or document will be imported.
region IDREF. The region attribute may be used when importing a <regionBase>. It identifies a <region> element of the importing document that will nest (will be the parent region) all imported <region> elements.
baseId IDREF. The baseId attribute may be used when importing a <regionBase>. It defines the <regionBase> element to be imported through its id value.
Back to top