Standard field

Represents one field in a content item, relation or set of options. The element's content model appears to allow almost anything, but in practice this is not the case. When importing, the field element content is expected to conform to a field definition identified by the name attribute, and will fail to be imported if this is not the case.

"Link" fields

If the field definition identified by the name attribute has the type "link", then the field is expected to contain the path of a binary file that is to be uploaded (for example, an image or other multimedia file, a PDF file, word processing document or spreadsheet). The referenced object must be located somewhere on the server.

If you are using Web Studio to import the syndication file, then the field must contain the absolute path of the binary file, for example:

<field name="image" title="Def">/tmp/import/def.jpg</field>

If you are using the import service, however, then the field can contain either an absolute or a relative path (relative to the importDirectory as defined in the import task configuration file):

<field name="image" title="Ghi">ghi.jpg</field>

For information about import task configuration files, see Editing Task Configuration Files.

In-line relations

If the field definition identified by the name attribute has the type "basic" and the mime-type "application/xhmtl+xml", then the field may contain in-line relations to other content items such as images or related articles. These in-line relations are represented by relation elements included in the XHTML/XML markup in the field.

Schedule fields

If the field definition identified by the name attribute has the type "schedule", then the field must contain a schedule:schedule element (schedule:schedule) containing the value of the schedule field.

Collection fields

If the field definition identified by the name attribute has the type "collection", then the field may either contain:

  • An origin element plus an optional value element:

    <field name="collection">
      <origin href="http://uri/of/origin"/>
      <value>Value</value>
    </field>
  • Or a section-ref element:

    <field name="collection">
      <section-ref unique-name="the_unique_name"/>
    </field>
Enumeration fields

If the field definition identified by the name attribute has the type "enumeration" and the multiple attribute is set to "false" then the field may contain 0 or 1 value elements. If the field definition's multiple attribute is set to "true", however, then the field may contain any number of value elements.

Arrays

If the field definition identified by the name attribute specifies that this is an array, then the field must contain a sequence of 0 or more value elements containing the members of the array.

Complex fields

If the field definition identified by the name attribute has the type "complex", then the field must contain a sequence of 0 or more field elements containing the members of complex field.

Syntax
<field
    name="text"
    title="text"?
  >
  ((ANY-FOREIGN-ELEMENT|<relation>...</relation>|text)*|<field>...</field>*|<value>...</value>*|<schedule:schedule>...</schedule:schedule>|<origin/> <title>...</title>?<value>...</value>?|<section-ref/>)
    <options>...</options>?
</field>

Only one form of the field element may be used: Standard field.

Attributes
name="text"

Identifies the content item/relation field represented by this field element. For import, the value specified must be the name of one of the fields defined for the content item/relation in the target publication's content-type resource. The value you specify here will then determine what kind of content your field element may have.

If, for example, your field element has the name "headline" and belongs to a content element with the type "news", then:

  • The content-type resource of the target publication must contain a content-type element with the name "news".

  • The "news" content-type element must contain a field element with the name "headline".

  • The content of your field element must conform to the "headline" field definition in the content-type resource.

title="text" (optional)

A title associated with the field. This attribute is only used for link fields (fields that are defined in the content-type resource as having the type "link"). It is used to hold an alternative name for the resource referenced in the field. It could be used, for example, to contain a descriptive title (e.g "London Bridge") for a link field containing the URL of an image file with a cryptic auto-generated name (e.g image-store://places/img099345.jpg).