This shows you the differences between two versions of the page.
— |
importncl [2014/09/16 14:26] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== The <importNCL> Element ===== | ||
+ | ==== Definition and Usage ==== | ||
+ | |||
+ | The [[importncl|<importNCL>]] element allows for incorporating another NCL document | ||
+ | specification. As a consequence, all bases defined inside the imported NCL | ||
+ | document, as well as the document [[body|<body>]] element, are imported, all at | ||
+ | once. The bases will be treated as if each one is imported by [[importbase|<importBase>]] | ||
+ | elements. The imported [[body|<body>]] element will be treated as a [[context|<context>]] | ||
+ | element. It should be stressed that the [[importncl|<importNCL>]] element does not | ||
+ | “include” the referred NCL document but only makes the referred document | ||
+ | visible to have its components reused by the document that has defined the | ||
+ | [[importncl|<importNCL>]] element. Thus, the imported [[body|<body>]], as well as any of its | ||
+ | contained nodes, may be reused inside the [[body|<body>]] element of the importing | ||
+ | NCL document. | ||
+ | |||
+ | The //documentURI// attribute of the [[importncl|<importNCL>]] element refers to a URI | ||
+ | corresponding to the NCL document to be imported. The //alias// attribute | ||
+ | specifies a name to be used as prefix when referring to elements of this | ||
+ | imported document. The reference must have the format: alias#element_id. It | ||
+ | is important to note that the same alias should be used when referring to | ||
+ | elements defined in the indirectly imported document bases ([[regionbase|<regionBase>]], | ||
+ | [[connectorbase|<connectorBase>]], [[descriptorbase|<descriptorBase>]], etc.). | ||
+ | |||
+ | 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 baseBis not considered by baseA. | ||
+ | |||
+ | ==== Syntax ==== | ||
+ | ^ Element ^ Attributes ^ Content ^ Parent ^ | ||
+ | | [[importncl|<importNCL>]] | __//alias//__, __//documentURI//__ | -- | [[importeddocumentbase|<importedDocumentBase>]] | | ||
+ | ==== 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. | | ||
+ | |||
+ | |||
+ | |||