Examples

The following is the XSD describing the Text Block XML. It can also be obtained by running tbmigrate.exe with the /xsd flag. Then, it will be written in the file TBimport.xsd.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.aia-itp.com/Repository/3.1/TextBlockImport" elementFormDefault="qualified" xmlns="http://www.aia-itp.com/Repository/3.1/TextBlockImport" xmlns:mstns="http://www.aia-itp.com/Repository/3.1/TextBlockImport" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="tbk">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="par" type="Paragraph" />
        <xs:element name="lst" type="List" />
      </xs:choice>
      <xs:attribute name="xsv" use="required" fixed="2.0.1" />
    </xs:complexType>
  </xs:element>
  <xs:complexType name="List">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="par" type="Paragraph" />
      <xs:element name="lst" type="List" />
    </xs:choice>
    <xs:attribute name="style" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="unordered" />
          <xs:enumeration value="ordered" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="Paragraph">
    <xs:choice maxOccurs="unbounded">
      <xs:element name="txt" type="Text" minOccurs="0" />
      <xs:element name="fld" type="Field" minOccurs="0" />
      <xs:element name="chr" type="Character" minOccurs="0" fixed="" />
    </xs:choice>
    <xs:attribute name="indentation" use="required" type="xs:nonNegativeInteger" />
    <xs:attribute name="hanging-indentation" use="optional" type="Boolean" fixed="false" />
    <!-- hanging-indentation is for internal use only -->
    <xs:attribute name="font" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="normal" />
          <xs:enumeration value="header" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="Text">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attributeGroup ref="FontStyle" />
        <xs:attribute name="id" use="optional" type="String254" fixed="" />
        <!-- id is for internal use only -->
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="Field">
    <xs:simpleContent>
      <xs:extension base="String254">
        <xs:attributeGroup ref="FontStyle" />
        <xs:attribute name="set" use="required" type="String254" />
        <xs:attribute name="id" use="optional" type="String254" fixed="" />
        <!-- id is for internal use only -->
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="Character">
    <!-- special/whitespace characters -->
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attributeGroup ref="FontStyle" />
        <xs:attribute name="type" use="required">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="LBR" />
              <!-- Line break -->
              <xs:enumeration value="NBSP" />
              <!-- Non-breakable space -->
              <xs:enumeration value="NBHH" />
              <!-- Non-breakable hyphen -->
            </xs:restriction>
          </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="id" use="optional" type="String254" fixed="" />
        <!-- id is for internal use only -->
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:attributeGroup name="FontStyle">
    <xs:attribute name="underline" use="optional" type="Boolean" default="false" />
    <xs:attribute name="italic" use="optional" type="Boolean" default="false" />
    <xs:attribute name="bold" use="optional" type="Boolean" default="false" />
  </xs:attributeGroup>
  <xs:simpleType name="String254">
    <xs:restriction base="xs:string">
      <xs:maxLength value="254" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Boolean">
    <xs:restriction base="xs:string">
      <xs:enumeration value="false" />
      <xs:enumeration value="true" />
    </xs:restriction>
  </xs:simpleType>
</xs:schema>

The following is an example Text Block Import XML.

<?xml version="1.0" encoding="utf-8"?>
<tbk xsv="2.0.1" xmlns="http://www.aia-itp.com/Repository/3.1/TextBlockImport">
  <par font="header" indentation="0">
    <txt underline="false" italic="false" bold="false">An example of a text block XML.</txt>
  </par>
  <par font="normal" indentation="0">
    <txt underline="false" italic="false" bold="false">Fields from the first set: </txt>
    <fld underline="false" italic="false" bold="false" set="Field_set_1">Field_1</fld>
    <txt underline="false" italic="false" bold="false"><![CDATA[, ]]></txt>
    <fld underline="false" italic="false" bold="false" set="Field_set_1">Field_2</fld>
    <txt underline="false" italic="false" bold="false"><![CDATA[, ]]></txt>
    <fld underline="false" italic="false" bold="false" set="Field_set_1">Field_3</fld>
    <txt underline="false" italic="false" bold="false"><![CDATA[.]]></txt>
  </par>
  <par font="normal" indentation="0">
   <txt underline="false" italic="false" bold="true">Text</txt>
   <txt underline="false" italic="false" bold="false"><![CDATA[ ]]></txt>
   <txt underline="false" bold="false" italic="true">with</txt>
   <txt underline="false" italic="false" bold="false"><![CDATA[ ]]></txt>
   <txt italic="false" bold="false" underline="true">various</txt>
   <txt underline="false" italic="false" bold="false"><![CDATA[ ]]></txt>
   <txt bold="true" italic="true" underline="true">decorations</txt>
   <txt underline="false" italic="false" bold="false"><![CDATA[.]]></txt>
  </par>
  <par font="normal" indentation="0">
    <txt underline="false" italic="false" bold="false">Fields from the second set with various decorations: </txt>
    <fld underline="false" italic="false" bold="true" set="Field_set_2">A_field</fld>
    <txt underline="false" italic="false" bold="false"><![CDATA[, ]]></txt>
    <fld underline="false" bold="false" italic="true" set="Field_set_2">Another_field</fld>
    <txt underline="false" italic="false" bold="false"><![CDATA[, ]]></txt>
    <fld italic="false" bold="false" underline="true" set="Field_set_2">Yet_another_field</fld>
    <txt underline="false" italic="false" bold="false"><![CDATA[.]]></txt>
  </par>
  <lst style="ordered">
    <par font="normal" indentation="0">
      <txt underline="false" italic="false" bold="false">numbered item</txt>
    </par>
  </lst>
  <lst style="unordered">
    <par font="normal" indentation="0">
      <txt underline="false" italic="false" bold="false">bullet-point item</txt>
    </par>
  </lst>
  <par font="normal" indentation="1">
    <txt underline="false" italic="false" bold="false">Indented text</txt>
  </par>
  <par font="normal" indentation="1">
    <txt underline="false" italic="false" bold="false">Non</txt>
    <chr underline="false" italic="false" bold="false" type="NBHH"/>
    <txt underline="false" italic="false" bold="false">breaking</txt>
    <chr underline="false" italic="false" bold="false" type="NBSP"/>
    <txt underline="false" italic="false" bold="false">space witth</txt>
    <chr underline="false" italic="false" bold="false" type="LBR"/>
    <txt underline="false" italic="false" bold="false">linebreak.</txt>
  </par>
</tbk>

The preceding example, being imported into KCM Repository, results in the following Text Block.

Imported Text Block