close

Filter

Importer Manual / Version 2201

Table Of Contents

4.1.3 Container Elements

The main components of CoreMedia XML are the elements <coremedia>, <document> and <version>. These elements provide the structure of documents. The content is held in field elements below <version> elements.

<coremedia>

<coremedia> is the root element. It contains, as children, the documents for import.

Attributes:

xml:base gives the basis URL for the href attributes which refer to resources. The href attributes can then be given relative to this URL. Setting xml:base is optional; the default value is the file URL of the XML file.

<document>

<document> stands for a document in CoreMedia CMS. <document> elements can be direct children of <coremedia> or specified so to speak "inline" in <linklist> elements.

Attributes:

name and path give the name of the document under which it is stored in CoreMedia CMS. Both attributes must be set. path is always interpreted as an absolute path. If the importer finds a document with the same name and the same document type in the target directory a new document version is created. If the existing document has a different type, the import fails. If no such document exists, a new document is created.

type describes the document type of the document and must also be set. The permissible values are the types which you have defined when configuring CoreMedia CMS.

id identifies the document. Other documents may use the ID to reference this document (see Section 4.1.2, “IDs”). To satisfy the DTD, the ID must be entered, even when the document is not referenced. For handling IDs, the following rules apply:

  • Internal IDs are automatically mapped to the corresponding target IDs by the importer. How this mapping occurs in detail depends on whether the document is mapped, via name and path, to an existing or to a new document.

  • The explicit allocation of new target IDs is not possible via import and is rejected by the importer.

  • If the value is a valid target ID and the given name and path does not match the position of the existing document, the document is moved to the new position. If the new position is already occupied by another document, this is not overwritten and the import fails.

  • A target ID which designates an existing document of a different document type results in an import failure.

<version>

A document in CoreMedia CMS usually consists of several versions. On import of a document, new versions of the document are created. All content information of a document belongs to a certain version. Correspondingly, <version> is the only permissible type for child elements of <document>. A <document> can contain multiple <version> elements, that is the complete history of a document can be imported in one step. The <version> elements contain the actual content and the state in the form of field and action elements.

Attributes:

number is irrelevant, since new versions are always created on import and the successive number results automatically from the existing versions of the document. Reimport of an existing version via the number is therefore not possible. Due to the DTD, number must be set nevertheless. If you have only one version element use "1" as the attribute value.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.