Namespace prefix

Namespaces in XML are a way to avoid any potential name conflicts by differentiating elements or attributes within an XML document that may have identical names, but different definitions. A namespace is bound to a namespace prefix via the @xmlns attribute on the root element. As its name suggests, a namespace prefix is used to prefix element names.

CXML uses the tps: namespace prefix. It is defined via the @xmlns attribute on the root content (<content>) element. CXML files are valid, and will run through Typefi, with or without the tps: prefix. However, you can't use the tps: prefix on just some elements—it has to be all or nothing.

For clarity, our CXML examples do not use the tps: namespace prefix.

Namespace extensions

New in CXML 3.4

CXML 3.4 introduces support for the ContentXML/Extensions namespace, which allows tools such as Orion and DOCX converters to attach custom attributes and elements to CXML content.

The Extensions namespace URI is http://www.typefi.com/ContentXML/Extensions.

The CXML processor passes Extensions namespace content through without validating or acting on it (processContents="skip"). This allows converters to round-trip information (such as Word comments and tracked changes) that has no direct equivalent in the CXML element set.

The Extensions namespace can be used in two ways:

As attributes on supported elements

Most CXML elements accept arbitrary attributes from the Extensions namespace. Declare the namespace on the <content> root element, then use it to attach custom attributes to any element that supports it:

xml
<content xmlns="http://www.typefi.com/ContentXML"
         xmlns:ext="http://www.typefi.com/ContentXML/Extensions">
  <section>
    <p ext:commentId="42" ext:resolved="false">
      Strange women lying in ponds distributing swords
      is no basis for a system of government.
    </p>
  </section>
</content>

As block-level elements

The Extensions namespace can also be used to insert custom elements at the block level — as siblings to <p>, <context>, <ol>, and other block elements:

xml
<content xmlns="http://www.typefi.com/ContentXML"
         xmlns:ext="http://www.typefi.com/ContentXML/Extensions">
  <section>
    <p>Help, help, I'm being repressed!</p>
    <ext:annotation type="editorial" author="Dennis">
      Come and see the violence inherent in the system.
    </ext:annotation>
    <p>Nobody expects the Spanish Inquisition.</p>
  </section>
</content>
Last updated: 27 Apr 2026, 18:30:36
Loading navigation...