Working With Inx File Format
Working With Inx File Format
iii
Contents
Story . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Exporting an InDesign CS2 document as INX data and then importing the INX data into the
same version of InDesign CS2 exactly recreates the original document. Importing the INX data
into an earlier version (e.g., InDesign CS) requires the Save Backwards feature. Exporting and
importing fragments of documents enables the asset libraries, actions, and InCopy stories fea-
tures, and possibly other features.
When a document is saved in INX format as part of a Save Backwards operation, an entirely
new InDesign document is created from the INX data. Because of differences between versions
of InDesign, the resulting document may not look exactly like the original. For example, differ-
ences in the composition algorithm may cause slight differences. The new INX file may contain
objects or object properties that did not exist in the earlier version of InDesign; these objects
and properties are ignored during import into the earlier version of InDesign.
Hierarchy of objects
An INX file is usually large and consists of obscure-looking codes, so it appears to be compli-
cated. However, the INX file structure is simple. To get an impression of what an INX file looks
like do the following:
1. In InDesign, open a very simple InDesign document. (An empty document will suffice for
this exercise.)
2. Export the document to INX format by choosing File > Export and selecting InDesign
Interchange.
6
Working with the INX file format
Introduction to the INX file format
3. Open the file in a text editor, such as Notepad, Visual Studio, or an XML editor such as
XMLSpy.
The hierarchical scripting document object model is exactly the same as the InDesign scripting
DOM. Compared to the legacy scripting view, there are only a few differences:
z A few new objects store information for facilitating the processing of INX (such as the
InsertionPoint object).
z A few attributes are added and a few are removed to improve the performance of INX file
export and import.
z Scripting events are not relevant to INX.
Order of objects
Inside the document object, its first-level (direct) child objects are listed one by one, indented
by one tab character. The documents preference objects are listed first; followed by more visi-
ble content, such as layers, master spreads, spreads, sections, XMLStory, stories, and so on; the
final part contains other objects.
In general, children appear in the same order as in the scripting DOM. You can regard this as
random order; in other words, do not assume that objects will occur in any particular order.
However, there are several special cases in which the children do occur in a certain order. In the
case of the document object itself, its children are sorted. For a list of objects whose children
are placed in a certain order and their respective algorithms, refer to Appendix B: Objects with
ordered children on page 29.
NOTE: The order of the children might change at any time. Do not reorder the objects; doing
so could cause problems because certain objects require that others be created first.
Element Description
aid Reserved token that InDesign uses for its INX-processing instructions.
style Identifies style, which is set forth for various INXOptions, 33 = 0x21, which
represents InDesign CS2, use Readable numbers.
type Identifies the intended use of this INX file. INX files that serialize the state of an
InDesign document are of type document.
DOMVersion Identifies the version of the scripting DOM that was used to export the file.
Currently, there are two possible values: 1 for InDesign CS and 4.0 for InDesign
CS2.
featureSet Identifies the scripting DOM feature set that was used during export. This value is
either 256 for the Roman feature set or 257 for Japanese.
Document docu
Color colr
Spread sprd
Story cflo
TextStyleRange txsr
8
Working with the INX file format
Interpreting INX file content
Because the names are derived directly from the scripting DOM, you can refer to the InDesign
Scripting Reference to learn about the meaning of each object, property, and property value.
NOTE: Some attribute and element names, such as Item Geometry, are used only in INX and
are not documented in the Scripting Reference. See ScriptID values used only in the
INX file format on page 14 for details.
Decoding an element
An element is represented as its attributes and children. Here is an example of a gradient ele-
ment with two child elements:
<grad grdt="e_axlg" pnam="c_" edbl="b_t" rmbl="b_t" pvis="b_f" ptag="c_"
Self="rc_u7b">
<gstp gcls="o_u7c" loca="D_0" Self="rc_u7bgstp0"/>
<gstp gcls="o_u8" loca="D_100" mids="D_50" Self="rc_u7bgstp1"/>
</grad>
scriptIdValue Represents the property name of the attribute. Look it up in the value-name lookup
table. For example, grdt is the gradient type.
type The type of the value. Look it up in Terminals on page 27. For example, rc
represents two aspects of the type, a Read_only (r) attribute of type Type_string;
whereas e indicates a type of Type_enum.
value The value of the attribute. The value is represented by the characters after the
underscore (_) character. For example, D_100 represents a Double valued 100.00; b_t
represents a Boolean with the value of true; o_u7c represents an object reference with
identifier u7c. If the type is Type_enum, then look up its ScriptID value in the value-
name lookup table; for example, e_axlg represents an enumeration of type Linear.
Attributes values can contain subvalues; for example, a list containing items. For this, recur-
sively analyze each item as shown in Table 3. For each child element, recursively interpret the
element and its attributes. By such recursive analysis, you can translate each plain, static XML
element and attribute to dynamic, structured scripting DOM objects and properties.
10
Working with the INX file format
Interpreting INX file content
The characters disallowed from a well-formed XML document are as follows (values in hexa-
decimal):
z 0x0000-0x0008
z 0x000B
z 0x000C
z 0x000E-0x001F
z 0xD800-0xDFFF
You can compare ACE values to those found in TextChar.h. For example, <?ACE 4?> represents
Footnote Marker; <?ACE 19?> represents Section Marker.
NOTE: This special treatment is common for INX and XML.
Recall from the discussion of object references that a Self property serves as the target for
object-to-object references. Recall also that the value of the property is unimportant; it is sim-
ply a string that is guaranteed to be unique within the INX file.
In the preceding example, the text implies that the marker is used to indicate where an inline
graphic should be placed. Elsewhere in the INX file is an element with an attribute that refer-
ences the marker. In effect, the element is saying, Place me here.
Here is what a simple inline rectangle might look like. Some attributes have been removed for
simplicity:
<crec STof="ro_ua0cinsc" flcl="o_u9" Self="rc_ub7">
</crec>
The rectangles Story Offset (Stof) attribute points to the desired location in the text.
There are also other uses for markers. Sometimes they are used in pairs to delimit a range of
text, such as a range of tagged text.
Table attributes
Table cells also have attributes. Do not confuse these with the attributes of the text that the cells
contain. An example of a cell attribute is its stroke style.
Processing cell attributes is similar to processing text attributes. Things are slightly easier
because, as of now, there is only a single base table style. Every table is deemed to have the set of
attributes defined by this style. Every table cell, in turn, inherits this same set of attributes.
Note that, whereas a Text Style Range points to its Paragraph and Character styles, Table and
Cell elements do not. In the future, if generalized table styles are supported, this will change.
To determine the full set of attributes that apply to each table cell do the following:
1. Apply the base attributes values found in the table style (tsty) element.
2. Apply overrides found on the Cell element itself.
NOTE: If you set an attribute on one cell, it does not carry over to another. Each cell starts over
with the attributes defined in the base table style.
12
Working with the INX file format
Interpreting INX file content
List type
There are three type of lists: General_list, Record_list, and Object_list. Their terminals are x, y,
and z, respectively. See Appendix A: Attribute values on page 26 for formal definitions.
Some list values are quite straightforward to decode, such as the following example:
clvl="x_4_D_0_D_0_D_0_D_0"
In the above example, the attribute value of clvl (color value) is a list type with four items. The
items are of type Type_readable_double, and all have the value 0. That is, the C, M, Y, and K
components are all 0.
Special attention is required for lists, because they are generated dynamically; before a list is
exported to an INX file, you cannot predict how many items the list will have. In addition,
General_list can consist of multiple Simple_value items; thus its items type could be mixed.
For example, the first item could be a double, the second could be a string, the third an enu-
meration, the fourth an object, and so on. The following example describes a page item (rect-
angle):
<crec txwr="ro_uafctxw1" IGeo="x_19_l_1_l_4_l_2_D_353_D_-
317_l_2_D_353_D_165_l_2_D_478_-165_l_2_D_478_D_-317_b_f_D_353_
D_-317_D_478_D_-165_D_1_D_0_D_0_D_1_D_0_D_0" cntt="e_unas"
Xaxn="ro_n" xpSs="D_0" xpSn="D_0" xpVn="D_0" xpBm="e_norm"
xpBo="D_100" xpBk="b_f" xpBi="b_f" xpSm="e_none" xpSb="e_xpMb"
xpSx="D_7" xpSy="D_7" xpSr="D_5" xpSc="o_ua" xpSo="D_75"
xpVm="e_none" xpVw="D_9" xpVc="e_xpCc" ovrp="ro_n" STof="ro_n"
flcl="o_u11" filt="D_-1" ovpr="b_f" lnwt="U_1" mitr="D_4"
endc="e_bcap" endj="e_mjon" stty="o_di5a29" llen="e_none"
rlen="e_none" lncl="o_u8" lint="D_-1" pcef="e_none"
pcrd="D_12" pgst="x_2_U_0_U_0" pgfl="U_0" pgfa="D_0"
pgss="x_2_U_0_U_0" pgsl="U_0" pgsa="D_0" gapT="D_-1"
strA="e_stAC" nopr="b_f" pilr="o_u6c" plck="b_f" pLDs="e_Dflt"
ptag="c_" Self="rc_uaf">
IGeo (Item Geometry) of crec (rectangle) is a general list with 25 items (the length is stored in
hexadecimal form after the type terminator, where 0x19 equals 25). It may be difficult to
understand this list until you know the proper structure of the property. Fortunately, the
Scripting Guide describes each property and its possible values. Those few special properties
that are used only when exporting and importing INXsuch as IGeoare documented in
ScriptID values used only in the INX file format on page 14.
NOTE: The documentation attempts to list all possible properties and their variations; however,
sometimes new, undocumented properties are added. When a special value is found, it
should be resolved on a case-by-case basis.
Encoded block
The INX file contains several blocks of ASCII encoding data. Data is encoded because it is
binary and must be encoded to put it into an XML file. There are some exceptions, such as EPS
Text Data.
NOTE: Do not alter the content of any encoded block.
Enumerations
The following enumerations are special to the INX file format. The rightmost two column in
the table describe the possible enumerators.
14
Working with the INX file format
ScriptID values used only in the INX file format
en_GridStartingPointType grid Gstp Options for the grid gsto top outside
starting starting point. Value type gsti top inside
point of p_GridStartingPoint gsbo bottom outside
options property gsbi bottom inside
gscv center vertical
gsch center horizontal
gscc center completely
en_Override color eOvr The override type. Value norm normal
override type of p_Override eOvP specialpaper
property eOvB specialblack
eOvR specialregistratio n
eOvH hiddenreserved
eOvM mixedinkparent
Properties
The following table lists the properties that are special to INX. For the purpose of understand-
ing INX, if the storage type is simple, you can assume that the value string in the INX is quite
simple, too (for example, because storage type Long means that the value is a long int, you can
expect the value string to be something like l_12345 and just interpret the result as integer
12345). However, if the storage type is complex (such as an array of arrays of mixed types),
decoding is also more complex. Information on how to decode the specific value strings are
given in Table 4.
NOTE: Some Property IDs represent different Scripting Elements, so their meaning could be
different. Also, to facilitate fast lookup, the table is sorted according to the ScriptID
value.
TABLE 4 Property table
p_DMDataSo data source dsfl kDataMergeDataSo File A value for the form
urceFile file urceFileScriptEleme f_xxx, where xxx is file-
nt name string of SysFile
16
Working with the INX file format
ScriptID values used only in the INX file format
p_IntrinsicBo intrinsic Mibd kIntrinsicMovieBou Array of two Store width and height of
unds bounds ndsPropertyScriptEl Long values intrinsic bounds (of movie
ement page item).
p_AllCellGra all cell pcgl kAllCellGradientAtt Array of Real General list type. First two
dientAttrList gradient rListPropertyScriptE values, arrays of items are length and angle
attr list lement two Unit values of cell gradient, third is a
list with two items, which
are (x, y) coordinates of
gradient center.
18
Working with the INX file format
ScriptID values used only in the INX file format
p_AllRunInStyles
Storage type: Array of arrays of ID/value pairs
This property stores a list of all of the properties of all of the nested styles on the object.
Example of the attribute value:
alrs="x_4_z_4_63727374_o_u58_72697465_e_RIdc_72696374_l_1_72696963_b_t_
z_4_63727374_o_u58_72697465_e_RIdw_72696374_l_a_72696963_b_t_
z_4_63727374_o_u58_72697465_e_RIdc_72696374_l_1_72696963_b_t_
z_4_63727374_o_u58_72697465_c_Sentences_72696374_l_8_72696963_b_t"
Applying the algorithm provided in Decoding an element on page 9 to decode the ID/value
pairs for the first example record shown above, you can see the following:
z x_4 indicates a general list type of four items.
z z_4 indicates a Record list with four items that represents all properties of a kAllRunInStyle-
ObjectScriptElement.
z 63727374_o_u58 indicates a property of crst/p_AppliedCharStyle on kCharacterStyleProp-
ertyScriptElement, whose value is an object.
z 72697465_e_RIdc indicates a property of rite/p_RunInTriggerExp ("delimiter") on
kTriggerExpressionPropertyScriptElement, whose value is an enum.
z 72696374_l_1_ indicates a property of rict/p_RunInCount ("repetition") on kRunInCount-
PropertyScriptElement, whose value is a long int.
z 72696963_b_t_ indicates a property of riic/p_RunInInclusive on kRunInInclusiveScriptEle-
ment, whose value is a Boolean.
NOTE: This decodes one Record list; you could apply the same method to the other three
records, thereby decoding the whole value string.
p_BNBulletChar
Storage type: Array of Bulletcharactertype enumerators or Long values
INX uses the kBNBulletCharacterPropertyScriptElement to access the kBNBulletCharacter-
ObjectScriptElement objects properties directly, so its value is not a reference to an object;
rather, it is a general list of two items.
An example value:
"x_2_e_BCuf_l_2022"
z x_2 indicates a general list type of two items.
z e_BCuf indicates an enum whose value is BCuf/en_BCUnicodeWithFont. Other possible
values are BCuo/en_BCUnicodeOnly and BCgf/en_BCGlyphWithFont.
z l_2022 indicates a long whose value is 2022.
p_HyperlinkDestination
Storage type: Array of String, Long or Boolean values, HyperlinkTextDestination, Hyper-
linkPageDestination, HyperlinkExternalPageDestination, or HyperlinkURLDestination
The storage type looks complicated, but it actually has only the following three cases:
z If there is no destination indicated, the value is a nil object reference.
z If it is an external destination, then the value is a list of external datalink information, which
stores file name, volume name, DirID, ClassID, and hyperlink destination UID. Except for
the last item, they are the same as p_LinkInfo on page 21.
z If it is a valid internal destination, it stores the object reference to the destination (that is, the
xxxDestination objects).
p_ItemGeometry
Storage type: Array of Long, Boolean, or Real values
p_ItemGeometry is a complex property. It stores geometry information about a page item. Its
value is a list that has mixed value items.
20
Working with the INX file format
ScriptID values used only in the INX file format
p_InstanceList
Storage Type: Array of strings or story references
z This is a general list that stores names (string) and stories (object reference) of index
instances alternatively (odd-numbered items are names, even-numbered items are stories).
z This is a property of the document object.
p_LinkInfo
Storage type: Array of String, Long, Date, or Boolean values
Stores link information.
An example:
LnkI="x_c_c_C:\shuksan\build\qa\testfile\BOTTLE.TIF_c__l_0_l_8c01_c_TIFF_l_0_c__t_0
~21fd4_t_1c4137a~defef92a_l_0_b_t_b_f"
z x_c indicates a general list type of 12 (0x0c) items.
z c_C:\shuksan\build\qa\testfile\BOTTLE.TIF indicates a string representing the link path
and file name.
z c__ indicates a string representing the link Volume, whose value (on Windows) is an empty
string.
z l_0 indicates a long representing the the DirID, whose value (on Windows) is 0.
z l_8c01 indicates a long representing the ClassID, whose value is kDataLinkBoss.
z c_TIFF indicates a string representing the format name.
z l_0 indicates a long representing file type.
z c__ indicates a string representing the datalink full name for Mac OS, whose value (on Win-
dows) is an empty string.
z t_0~21fd4 indicates a 64-bit Type_alt_date representing the file size. The 64-bit value is sep-
arated into two 32-bit values by a tilde (~).
z t_1c4137a~defef92a indicates a 64-bit Type_alt_date representing the file time stamp. The
64-bit value is separated into two 32-bit values by a tilde (~).
z l_0 indicates a long representing the link state, which is (IDataLink::kLinkNormal). For
other possible values, refer to IDataLink.h.
z b_t indicates a Boolean representing the return value of IsLinkNeeded().
z b_f indicates a Boolean representing the return value of HasInternalDataChanged().
p_OverrideList
Storage type: Array of PageItem values
Stores a list of (master page item, layout page item) pairs within the page (because the page
object has this property).
For example:
ovrl="x_6_o_ucc_o_ud6_o_uf6_o_uf9_o_uf4_o_ufb"
z x_6 indicates a general list type of six items.
z o_ucc_o_ud6 indicates a (master page item, layout page item) pair.
z o_uf6_o_uf9 indicates a (master page item, layout page item) pair.
z o_uf4_o_ufb indicates a (master page item, layout page item) pair.
p_Content
Storage type: String
p_Content is also used in other objects where content has a meaningful string, such as the text
content of a story; but for these property elements that are available only in INX, p_Content is
used differently.
z For kImageContentsScriptElement and kAGMBlackBoxContentsScriptElement, p_Content
represents IAsciiEncodingUtils::kAscii64Encoding (or some other encoding type), an
encoded string of image content. Do not modify it directly.
z For kContentPropertyScriptElement, p_Content represents the XML packet representing
the metadata. Its a property of kMetaDataPacketObjectScriptElement (metadata packet
preference). The stored strings are also not encoded.
22
Working with the INX file format
ScriptID values used only in the INX file format
p_StoryOffset
Storage Type: InsertionPoint.
p_StoryOffset represents kPIStoryOffsetPropertyScriptElement, kChangeStoryOffsetProperty-
ScriptElement, kStoryOffsetPropertyScriptElement, and kNoteStoryOffsetPropertyScriptEle-
ment.
The value is an object reference to InsertionPoint. InsertionPoint is a special object that marks
a position inside text. See Marker processing instruction on page 11.
Objects
Table 5 summarizes objects that are available only in INX. Details about their base objects, par-
ent objects, children, and special properties are listed in the following detail sections.
TABLE 5 Objects table
c_AGMBlackBox
Base object: swatch, 'swch', kSwatchObjectScriptElement
Parents:
z "application", 'null', kApplicationObjectScriptElement
z "document", 'docu', kDocumentObjectScriptElement
Properties:
z "contents version", 'pvrs', kAGMBlackBoxVersionScriptElement
z "contents type", 'bbtp', kAGMBlackBoxTypeScriptElement
z "spot color list", 'spcl', kSpotListPropertyScriptElement
z "contents", 'pcnt', kAGMBlackBoxContentsScriptElement
z "contents encoding", 'bben', kAGMBlackBoxEncodingScriptElement
z "contents matrix", 'bbmx', kAGMBlackBoxMatrixScriptElement
c_EPSText
Base object: "page item", 'pitm', kPageItemObjectScriptElement
Parents:
z "spread", 'sprd', kSpreadObjectScriptElement
z "master spread", 'mspr', kMasterSpreadObjectScriptElement
z "page item", 'pitm', kPageItemObjectScriptElement
z "oval", 'covl', kOvalObjectScriptElement
z "rectangle", 'crec', kRectangleObjectScriptElement
z "polygon", 'cpgn', kPolygonObjectScriptElement
z "graphic line", 'glin', kGraphicLineObjectScriptElement
z "group", 'grop', kGroupObjectScriptElement
z "state", 'APrc', kAppearanceObjectScriptElement
z "document", 'docu', kDocumentObjectScriptElement
z "layer", 'layr', kLayerObjectScriptElement
z "page", 'page', kPageObjectScriptElement
z "button", 'Push', kPushButtonObjectScriptElement
z "text frame", 'txtf', kTextFrameObjectScriptElement
z "story", 'cflo' , kStoryObjectScriptElement
z "text", 'ctxt', kTextObjectScriptElement
z "character", 'cha ', CharacterObjectScriptElement
z "word", 'cwor', kWordObjectScriptElement
z "line", 'clin', kLineObjectScriptElement
z "text column", 'Ccol', kTextColumnObjectScriptElement
z "paragraph", 'cpar', kParagraphObjectScriptElement
z "text style range", 'txsr', kTextStyleRangeObjectScriptElement
z "cell", 'ccel', kCellObjectScriptElement
z "table", 'ctbl', kTableObjectScriptElement
z "insertion point", 'cins' , kInsertionPointObjectScriptElement
Properties:
z "item geometry", 'IGeo', kItemGeometryPropertyScriptElement
z "EPS text data", 'ETFC', kEPSTextDataPropertyScriptElement
z "EPS text attribute bounds", 'ETSC', kEPSTextAttrBoundPropertyScriptElement
c_XMLStory
Base object: "story", 'cflo', kStoryObjectScriptElement
Parents:
z "document", 'docu', kDocumentObjectScriptElement
24
Working with the INX file format
ScriptID values used only in the INX file format
Children:
z "text", 'ctxt', kTextObjectScriptElement
z "character", 'cha ', kCharacterObjectScriptElement
z "word", 'cwor', kWordObjectScriptElement
z "line", 'clin', kLineObjectScriptElement
z "text column", 'Ccol', kTextColumnObjectScriptElement
z "paragraph", 'cpar', kParagraphObjectScriptElement
z "insertion point", 'cins', kInsertionPointObjectScriptElement
z "text style range", 'txsr', kTextStyleRangeObjectScriptElement
z "table", 'ctbl', kTableObjectScriptElement
z "page item", 'pitm', kPageItemObjectScriptElement
z "story preference", 'SyPf', kStoryPrefsObjectScriptElement
z "grid data information", 'Jgda', kGridDataObjectScriptElement
z "metadata packet preference", 'cMep', kMetaDataPacketObjectScriptElement
Properties:
z "metadata packet", 'pMep', kMetaDataPacketPropertyScriptElement
z "lock state", 'lckS', kLockStatePropertyScriptElement
z "associated XML elements", 'Xans', kAssociatedXMLElementsPropertyScriptElement
c_MetaDataPacket
Base object: "preferences object", 'PObj', kPreferencesObjectScriptElement
Parents:
z "document", 'docu', kDocumentObjectScriptElement
z "graphic", 'Grfc', kGraphicObjectScriptElement
z "image", 'imag', kImageObjectScriptElement
z "EPS", 'EPS ', kEPSObjectScriptElement
z "WMF", 'WMF ', kWMFObjectScriptElement
z "PICT", 'PICT', kPICTObjectScriptElement
z "PDF", 'PDF ', kPDFObjectScriptElement
z "story", 'cflo', kStoryObjectScriptElement
z "xml story", 'cxst' kXMLStoryObjectScriptElement
Properties:
z "contents", 'pcnt', kAGMBlackBoxContentsScriptElement
Notes
Pay special attention to coordinates and their relationship to their parents.
The scripting model is always changing. Any time that a third-party plug-in is added, or an
existing plug-in is removed, the scripting DOM can change, which changes the INX file struc-
ture.
Some information is encoded and written as a block; accidentally overwriting it could change
the embedded images, sounds, video, and so on.
XML tags and enumerations in values are keywords to import INX; accidentally changing key-
words could cause the file to fail to import.
There is no definitive structure of INX files. There is no XML schema or anything like that that
describes the structure. However, if you have the debug version of InDesign, you may choose
Test > Diagnostics > INX DTD > Generate to generate a DTD of the current scripting DOM
tree. Just keep in mind that this is for information only, and you are not supposed to validate
INX against this DTD.
EBNF
() Group
{} Zero or more repetitions
[] Optional
| Choice
Non-terminals
Attribute_value ::= [ Read_only ] (Simple_value | Value_list)
Simple_value ::= Empty_value | Boolean_value | String_value |StringKey_value | Int16_value |
Int32_value| Readable_Double_value | Alt_Double_value | Object_value |
Readable_Date_value | Alt_Date_value | File_value |Enumeration_value |
Readable_Unit_value | Alt_Unit_value
Value_list ::= General_list | Object_list | Record_list
General_list ::= Type_list Separator List_count { Separator Simple_value }
26
Working with the INX file format
Appendix A: Attribute values
Terminals
Read_only ::= r
Type_empty ::= 0
Type_boolean ::= b
Type_string ::= c
Type_stringkey ::= k
Type_int16 ::= s
Type_int32 ::= l
Type_int64 ::= L
Type_readable_double ::= D
Type_alt_double ::= d
Type_object ::= o
Type_readable_date ::= T
Type_alt_date ::= t
Type_file ::= f
Type_enum ::= e
Type_readable_unit ::= U
Type_alt_unit ::= u
Type_list ::= x
Type_object_list ::= y
Type_record ::= z
Separator ::= _
True ::= t
False ::= f
Decimal_char ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
Hex_char ::= Decimal_char | a | b | c | d | e | f
Bit_separator ::= ~
Notes
1. A string can contain anything (including white space) except a separator (_). If a separa-
tor occurs in the string, it is replaced by a separator sequence (~sep~). You should check
for this sequence and replace it with a separator prior to using the string value.
2. Informally: 3 or -2.98 or 5.002.
3. An XML-standard date/time string. Informally: yyyy - mm - dd T hh : mm : ss
4. 64-bit values are stored as two 32-bit components, the high-order 32-bits, a ~, followed by
the low-order 32-bits. This separator prevents having to write a fixed number of hex digits
for each component.
5. The "String" in enum value is a four-character ScriptID representing the enumeration value.
28
Working with the INX file format
Appendix B: Objects with ordered children
Document
The document children appear in the following order:
XML items (c_XMLItem, 'cxit');
XML export maps(c_XMLStyleToTagMap, 'stmX');
XML import maps(c_XMLTagToStyleMap, 'tsmX');
Colors (c_Color, 'colr');
Mixed ink groups(c_MixedInkGroup, MxSg');
Mixed inks(c_MixedInk, 'MxSw');
Pasted smooth shades(c_AGMBlackBox, 'ctbb');
Tints(c_Tint, 'tint');
Swatchs(c_Swatch, 'swch');
Gradients(c_Gradient, 'grad');
Fonts(c_Font, 'FonT');
Character styles(c_CharStyle,'csty');
Paragraph styles(c_ParaStyle,'psty');
Named grids(c_NamedGrid, 'Jngd');
Kinsoku tables(c_KinsokuTable, 'Jkst');
Mojikumi tables(c_MojikumiTable, Jmjt');
Languages(c_Language, 'lang');
Preferences(all kind of preference objects);
Stroke styles(c_StrokeStyle, 'StSt');
XML tags (c_XMLTag, 'tagX');
Layers(c_Layer, 'layr');
Master spreads(c_MasterSpread, 'mspr');
Spreads(c_Spread, 'sprd');
Sections(c_Section, 'sctn');
PageItems(c_PageItem, 'pitm', all types of page items document directly own);
Stories(all stories);
Hyperlink text destinations(c_HyperlinkTextDestination, 'HLTd');
Hyperlink page destinations(c_HyperlinkPageDestination, 'HLPD');
Hyperlink URL destinations(c_HyperlinkURLDestination, 'HLUD');
Hyperlink external destinations(c_HyperlinkExternalPageDestination, 'HLEP');
hyperlink text sources(c_HyperlinkTextSource, 'HLTS');
hyperlink page item sources(c_HyperlinkPageItemSource, 'HLPs');
Hyperlinks(c_Hyperlink, 'HLOB');
Bookmarks(c_Bookmark, 'Bkmk');
All other remaining children of document;
Spread
The spread children appear in the following order:
First write non-page items;
Then write page items in reverse z-order (to make importing more efficient)
Table
The table children appear in the following order:
Table rows (c_TableRow, 'crow');
Table columns(c_TableColumn, 'ccol');
All other remaining children;
Story
The story children appear in the following order:
Put all story preferences first.
Text style ranges(c_TextStyleRange, 'txsr');
Tables(c_Table, ctbl');
Page items(c_PageItem, 'pitm', all types of page items story own);
Notes (c_Note, 'Note');
Changes (c_Change, 'Chng');
All other remaining children;
30