Fields

Typefi Fields

Typefi Fields are specialized containers for meta-information about Typefi Projects Fields, Section Fields, and Element Fields. All three types of Typefi Fields are set with the <fieldSet> element.

Project Fields are set with <fieldSet> directly under a content (<content>) element.

Section Fields are set with <fieldSet> directly under a Typefi Section (<section>). Section Fields can be either text-based or counters. If the latter, the value attribute for <fieldSet> is omitted.

Element Fields are text-based and are set with <fieldSet> directly under a Typefi Element (<context>).

<fieldSet> has three attributes:

AttributeValueDescription
idstringThe unique ID of the Typefi Field.
namestringRequired. The name of the Typefi Field.
valuestringThe value of the Typefi Field.

Two Project Fields and a Section Field:

xml
<content>
  <fieldSet name="Title" value="The Meaning of Life" />
  <fieldSet name="Author" value="Monty Python" />
  <section type="Sketch">
    <fieldSet name="ChapterTitle" value="The Miracle of Birth" />
    <p>What is the meaning of life?</p>
  </section>
</content>

Typefi Field Instances

A Typefi Field Instance (<fieldRef>) is a text variable in your content that represents the value of a Typefi Field. Field Instances do not roundtrip through InDesign.

The reference ID (@refId) attribute allows <fieldRef> to point to a <fieldSet> in a different section or element.

Cross-reference Typefi Fields: You can reference Typefi Fields (<fieldSet>) from any Typefi Section (<section>) or Typefi element (<context>) by pointing to the associated ID (or @refId) within a Typefi Field instance (<fieldRef>).

<fieldRef> has five attributes:

AttributeValueDescription
namestringRequired. The name of the Typefi Field you are referencing.
refIdstringThe unique ID of the section or element that contains the referenced <fieldSet> .
statusadded
changed
deleted
Indicates the modification status of the Typefi Field.
authorstringThe author of the tracked change.
dateTimeISO 8601 datetime stringThe date and time of the tracked change (2024-01-09T14:37:00Z).

A Field Instance:

xml
<content>
  <fieldSet name="year" value="1983"/>
  <section>
    <context>
      <p>Monty Python's The Meaning of Life (<fieldRef name="year"/>)</p>
    </context>
  </section>
</content>


<!-- Resolves to: -->
 
<content>
<fieldSet name="year" value="1983"/>
<section>
  <context>
    <p>Monty Python's The Meaning of Life (1983)</p>
  </context>
</section>
</content>

Cross-reference using @idand @refId:

xml
  <section type="Page 2" id="001">
    <fieldSet name="year" value="1983"/>
  </section>


  <content>
    <section>
      <context>
        <p>Monty Python's The Meaning of Life (<fieldRef name="year" refId="001"/>)</p>
      </context>
    </section>
  </content>


<!--Resolves to-->
  <content>
   <section>
     <context>
       <p>Monty Python's The Meaning of Life (1983)</p>
     </context>
    </section>
  </content>

Cross-reference with tracked changes:

xml
<content>
  <section>
    <context>
      <p>Monty Python's The Meaning of Life (<fieldRef name="year" status="added" author="Eric Idle" dateTime="1983-06-09T09:00:00Z"/>)</p>
    </context>
  </section>
</content>
Last updated: 15 Jun 2026, 14:29:04
Loading navigation...