Conditions

Conditions

Conditions are used to filter content. Conditions can be applied to content using the <condition> element, or applied using the @condition attribute for Typefi Sections (<section>), tables (<table>), and Typefi Elements (<context>). Conditions can exist both inside and outside paragraphs.

New in CXML 3.4

<condition> now supports @author and @dateTime.

<condition> has five attributes:

AttributeValueDescription
typestringRequired. The type of condition.
idstringThe unique ID of the condition.
statusadded
changed
deleted
Indicates the modification status of the conditional content.
author NEWstringThe author of the tracked change.
dateTime NEWISO 8601 datetime stringThe date and time of the tracked change (2024-01-09T14:37:00Z).

Conditional content using the <condition> element and using the @condition attribute:

xml
<section type="Questions">
   <condition type="US">
     <p>Analyze this:</p>
   </condition>
   <condition type="UK">
     <p>Analyse this:</p>
   </condition>
   <p>
     1. What is your
     <condition type="US">favorite color</condition>
     <condition type="UK">favourite colour</condition>
     ?
   </p>
 </section>
 <section type="Answers" condition="TeacherEdition">
   <p>1. Red!... I mean blue!</p>
 </section>

A condition with tracked changes:

xml
<section type="Questions">
   <condition type="US" status="added" author="John Cleese" dateTime="1975-04-05T09:00:00Z">
     <p>Analyze this:</p>
   </condition>
   <condition type="UK" status="added" author="John Cleese" dateTime="1975-04-05T09:00:00Z">
     <p>Analyse this:</p>
   </condition>
 </section>

Conditional list items

The <condition> element can be used inside <ol> and <ul> to apply conditions to groups of list items.

New in CXML 3.4

<condition> in list context now supports @author and @dateTime.

<condition> has five attributes in list context:

AttributeValueDescription
typestringRequired. The type of condition.
idstringThe unique ID of the condition.
statusadded
changed
deleted
Indicates the modification status of the conditional list items.
author NEWstringThe author of the tracked change.
dateTime NEWISO 8601 datetime stringThe date and time of the tracked change (2024-01-09T14:37:00Z).

Conditional list items:

xml
<ol>
  <condition type="US">
    <li><p type="List Number">Analyze this</p></li>
  </condition>
  <condition type="UK">
    <li><p type="List Number">Analyse this</p></li>
  </condition>
</ol>

Conditional list items with tracked changes:

xml
<ol>
  <condition type="US" status="added" author="John Cleese" dateTime="1975-04-05T09:00:00Z">
    <li><p type="List Number">Analyze this</p></li>
  </condition>
  <condition type="UK" status="added" author="John Cleese" dateTime="1975-04-05T09:00:00Z">
    <li><p type="List Number">Analyse this</p></li>
  </condition>
</ol>
Last updated: 27 Apr 2026, 18:30:36
Loading navigation...