===== The Element ===== ==== Definition and Usage ==== The [[context|]] element allows for structuring an NCL application. The element may contain elements with media content ([[media|]] elements), called media objects, other nested [[context|]] elements, elements grouping content alternatives ([[switch|]] elements), and relationships ([[link|]] elements) among all the objects represented by the aforementioned elements. It should be stressed that the [[body|]] element is considered a special kind of context, the one representing the whole application. The [[context|]] element may refer to another [[context|]] or an imported [[body|]] element. In this case, it inherits the specification of the referred element. ==== Syntax ==== ^ Element ^ Attributes ^ Content ^ Parent ^ | [[context|]] | __//id//__, //refer// | ([[port|]] | [[property|]] | [[media|]] | [[context|]] | [[link|]] | [[switch|]] | [[meta|]] | [[metadata|]])* | [[body|]] or [[context|]] or [[switch|]] | ==== Attributes ==== ^ Name ^ Value ^ Description ^ | //id// | It may receive any string value that begins with a letter or an underscore and that only contains letters, digits, <".">, and <"_">. | The //id// attribute uniquely identifies the element within a document. | | //refer// | IDREF or the string "alias#id" where "id" is an IDREF value. |

The //refer// attribute refers to an element //id// that will be reused. An element that refers to another element cannot be reused; that is, its //id// value cannot be the value of any //refer// attribute. The referred element must be a [[context|]] or an imported [[body|]] element.

The referred element and the element that refers to it must be considered the same regarding their data specification.

If the referred node ([[context|]] or [[body|]] element) is defined within an imported document D, the //refer// attribute value must have the format "alias#id", where "alias" is the value of the //alias// attribute associated with the imported D document.

|