Content Identifiers

The components of a CUE publication are inter-related in a variety of ways: content items belong to sections, sections belong to other sections, content items such as articles can contain other content items such as images, and may also contain links to other content items. Maintenance of these relations requires each content item to be uniquely identified.

CUE import is not only intended to support one-time import of new content to a publication, but also repeated import in which existing content items are replaced by new versions: this is an important requirement for media operations where CUE is not the primary editorial environment, but merely a means of repurposing content for the web. For this kind of repeated import it is also a requirement that the identifiers used are persistent and unchanging.

These varied requirements mean that the syndication format supports three different types of identifier. All syndication format elements that can be used to create a new object in the CUE database may be identified in one of three ways:

  • Using an id attribute. An id attribute must be unique within the current syndication file. That is the only requirement for an id attribute: it is not guaranteed unique in a larger context. You can use it when creating a completely new object, and you want to be able to refer to it from other elements in the same syndication file. It is not imported to the target publication.

  • Using a source and sourceid attribute. These two attributes can be combined to provide a unique identifier. The source attribute identifies the source system and the sourceid is used to contain the imported object's identifier in that system. You are recommended to use this form of identification whenever possible. It is the only type of identification that supports repeated import. Where cross-publishing is in use it may sometimes be necessary to use a publication-name attribute together with source and sourceid in order to indicate the publication to which a referenced content item or section belongs.

  • Using a dbid attribute. A dbid attribute is intended to hold the internal CUE database ID of an object. Such IDs can only be assigned by the Content Store and you can therefore only use this when re-importing an existing object, and only if the object's internal ID is known. In practice this means it should only be used when re-importing an object that has previously been exported (the dbid attributes are always set in an exported syndication file).

An element must have at least one of the above identifiers, but may have all three. If the dbid attribute is set and exists in the publication, then it is used: the specified existing object is updated. None of the other attributes are imported in this case. (If you want to change the source and sourceid attributes of an existing object, then you have to supply them in an update element.)

If the dbid attribute is not set, but the source and sourceid attributes are set, then these attributes will be used to look up an existing object. If an object with this ID is found, then it is updated. Otherwise a new object is created and assigned the supplied source and sourceid values.

If the only ID attribute supplied is id, then a new object is created, with no source or sourceid. The specified id value is not imported.