Standard field
Represents one field in a content item or relation. 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 optionalvalue
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>
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/> <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'scontent-type
resource. The value you specify here will then determine what kind of content yourfield
element may have.If, for example, your
field
element has thename
"headline"
and belongs to acontent
element with thetype
"news"
, then:-
The
content-type
resource of the target publication must contain acontent-type
element with the name"news"
. -
The
"news"
content-type
element must contain afield
element with the name"headline"
. -
The content of your
field
element must conform to the"headline"
field definition in thecontent-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 thetype
"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.gimage-store://places/img099345.jpg
).