This shows you the differences between two versions of the page.
— |
importbase [2014/09/16 14:26] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== The <importBase> Element ===== | ||
+ | ==== Definition and Usage ==== | ||
+ | |||
+ | The [[importbase|<importBase>]] element allows for incorporating an entity base | ||
+ | (represented by [[connectorbase|<connectorBase>]], [[regionbase|<regionBase>]], | ||
+ | [[descriptorbase|<descriptorBase>]], [[rulebase|<ruleBase>]] or [[transitionbase|<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: <nowiki>alias#element_id</nowiki>. | ||
+ | |||
+ | 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|<descriptorBase>]] element may have a child [[importbase|<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|<connectorBase>]] element may have a child [[importbase|<importBase>]] | ||
+ | element referring to a URI corresponding to another connector base to be | ||
+ | imported and nested; | ||
+ | * the [[transitionbase|<transitionBase>]] element may have a child [[importbase|<importBase>]] | ||
+ | element referring to a URI corresponding to another transition base to | ||
+ | be imported and nested; | ||
+ | * the [[rulebase|<ruleBase>]] element may have a child [[importbase|<importBase>]] element | ||
+ | referring to a URI corresponding to another NCL document containing the | ||
+ | rule base to be imported and nested; | ||
+ | * the [[regionbase|<regionBase>]] element may have a child [[importbase|<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|<importBase>]] element. On importing a [[regionbase|<regionBase>]], an | ||
+ | attribute named region may be specified within the [[importbase|<importBase>]] | ||
+ | element. When present, this attribute identifies the id of a | ||
+ | [[region|<region>]] element declared in a [[regionbase|<regionBase>]] element of the | ||
+ | host document (the document that does the importing operation). As a | ||
+ | consequence, all child [[region|<region>]] elements of the imported | ||
+ | [[regionbase|<regionBase>]] shall be considered as child [[region|<region>]] elements of | ||
+ | the region referred by the [[importbase|<importBase>]]’s region attribute. If not | ||
+ | specified, the child [[region|<region>]] elements of the imported | ||
+ | [[regionbase|<regionBase>]] shall be considered direct children of the host | ||
+ | document [[regionbase|<regionBase>]] element. | ||
+ | |||
+ | ==== Syntax ==== | ||
+ | ^ Element ^ Attributes ^ Content ^ Parent ^ | ||
+ | | [[importbase|<importBase>]] | __//alias//__, __//documentURI//__, //region//, //baseId// | -- | [[rulebase|<ruleBase>]] or [[transitionbase|<transitionBase>]] or [[regionbase|<regionBase>]] or [[descriptorbase|<descriptorBase>]] or [[connectorbase|<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|<regionBase>]]. It identifies a [[region|<region>]] element of the importing document that will nest (will be the parent region) all imported [[region|<region>]] elements. | | ||
+ | | //baseId// | IDREF. | The //baseId// attribute may be used when importing a [[regionbase|<regionBase>]]. It defines the [[regionbase|<regionBase>]] element to be imported through its //id// value. | | ||
+ | |||
+ | |||
+ | |||