Stories and XML stories get the Ai* attributes from DOM 21.5; links the
Ai* attributes from 21.5 and SourceObjectName from 21.4; every typed
ContourOption the four contour parameters from 21.4; object styles
EpubAriaLabel and EpubAriaLabelSourceType from 21.2; designmap.xml
Html5ExportPreference from 21.1. LockPosition and AnchorSpaceAbove go on
every AnchoredObjectSetting with all ten settings, polygons included,
in place of the per-tag WhenWritten blocks.
Page items:
- drop shadow KnockedOut (0x1EB6F), true where neither item nor style
stores it
- text wrap: the u32 at 40 of 0x3703 is the master page flag and the
wrap side (two u16, as the big-endian pair shows)
- groups get the fill, stroke and corner values all their children have
- dashes (0x5A35: list and corner code) on items whose stroke type in
effect is Dashed
- BeforeGroupingLayerPosition (0x324) from 21.4; export SizeType
(0x1E22B); no generated alt text attributes on groups
- anchored settings on items inside anchored items
- IgnoreWrap false without the chunk, MinimumFirstBaselineOffset 0 by
the baseline category, InsetSpacing before DOM 11 by the general
category; EPS contents from 0x8C23
- custom striped and dashed stroke styles (classes 0xB016, 0x5A43) and
StrokeType code 0x5A42
Preferences: column direction (0x555, else the story orientation),
optical margin size by the text size unit, highlight flags false without
their chunk, grid and gutter defaults and print marks by the edition
code, watermark font by the assignment name, EPUB ViewDocumentAfterExport
for DOM 8 and 9, HTMLFXLExportPreference from DOM 10.1, MathML document
values from DOM 20, index header type by variant name, three more
built-in kinsoku and mojikumi tables.
Resources and text: the saving edition from the XMP black name (tints
of black, unknown users, endnote and index titles, endnote marker), TOC
style entries, PageNumberType (0x1B09), CustomGlyph (0x1B5E), alignment
codes of 0x4266, 0x1B3E and 0xB676, spot colour alias and DOM 8 section
pagination (observed values), text variable settings and result texts,
object styles' AppliedParagraphStyle without a chunk and flex spacing,
stories of frames anchored in the XML backing story.
Fixes: flattener resolutions of 0x10833 were swapped; colour group Self
follows the DOM version.
compare.py, trustworthy pairs: value coverage 98.96 % -> 99.48 %
(+150,288 values), documents >= 99 % 914 -> 1,021, story text 37,129 ->
37,147 of 37,150 (0 missing), extras 92,838 -> 92,883 (+788 from the
KnockedOut and group-corner exceptions, -744 from fixed extras). No pair
loses values against f21267f. diff_outputs.py: 5,743 of 5,765 outputs
differ, no failure or warning differs.
Chunk 0x2800 has one u16 per attribute: AnchoredPosition at 40,
HorizontalReferencePoint at 42, VerticalReferencePoint at 44, AnchorPoint
from 46 and 50, HorizontalAlignment at 48, VerticalAlignment at 52,
SpineRelative at 54 and PinPosition at 56, with the two offsets at 0 and
16. The grouped tables written before were the combinations the smaller
corpus showed. Every field matches the 6,363 object styles, 1,076
anchored items and 1,295 preference chunks of the corpus.
An anchored item gets every value when its object style turns the
anchored object category off (670 items, with LockPosition and
AnchorSpaceAbove from the value files), else the values that differ
from the style's. Preferences and object styles without the chunk get
the values every such file has.
compare.py --exclude own/, trustworthy pairs: 98.46 % -> 98.51 %
(+11,653 values, 0 lost on any key); ObjectStyle SpineRelative
2,031 -> 5,556 of 5,556, preference SpineRelative 0 -> 1,251 of 1,251,
anchored text frames, rectangles, ovals, polygons, lines and groups
gain their settings (TextFrame PinPosition 2 -> 556 of 556). Extra
values unchanged (93,502).
Buttons, check boxes, radio buttons and multi-state objects list their
states in chunk 0x14521 and the items each state shows in chunk 0x14526;
their transform is chunk 0x14527. Text boxes, combo boxes and signature
fields hold their items in chunk 0x15B. The converter writes the
elements with their State elements (type from the state ID), the groups
of states named by their type, PathBoundingBox from the items' paths,
and the name, description, export value, required flag, text box font
and flags from the attribute list (objects.md, form fields). The value
files gain the constant values of buttons and multi-state objects.
Text boxes anchored in table cells now replace their U+FFFC, so those
stories' text matches.
compare.py (trustworthy pairs, with the commits before it): coverage
97.92 % -> 98.46 %, story text 37,112 -> 37,129 of 37,150; the form
field elements of all 48 documents are written (Button, Group, State,
Rectangle and their children about 150,000 values). Extra values from
anchored fields without a known object style are avoided by leaving
their anchor settings out.
- Frame fitting: AutoFit 1 (true), FittingAlignment 1 (TopCenterAnchor)
and 3 (LeftCenterAnchor). A rectangle, oval or polygon whose object
style turns the fitting category off (0x1B960 not in chunk 0x1B92E)
gets all seven attributes, the item's or the style's; this holds for
the root [None] too (22 trustworthy documents, 9,560 items; none in
the 883 others). A style with the category on writes only the item's
values that differ. The preference FrameFittingOption writes all seven,
0 or code 0 where the page item defaults list lacks one (1,251 of
1,251 pairs each).
- Object style OverprintFill, OverprintStroke and OverprintGap (0x6E6A,
0x6E67, 0x6E8B) where the colour carries ink (not None, Paper, tint 0
or a white process colour), on every style from 21.4.
- StyleUniqueId on every paragraph and character style when 11.2 saved
the document: the GUID after the name's string (GUID form only), else
$ID/. A 36-character style name is no longer taken for the GUID.
- Chunk 0x28F0 parsed with its export tag maps: SplitDocument, EmitCss
(10.1 on) and IncludeClass (13.0 on) on every text style, root styles
and styles with tag maps included, EmitCss and IncludeClass on object
styles; StyleExportTagMap elements. The WhenWritten values of these
attributes are dropped from element_values.xml.
Evidence in objects.md, preferences.md and idml-values.md.
compare.py --exclude own/, trustworthy pairs: 97.60 % -> 97.84 %
(+71,229 values, 0 lost on any key); Oval/Polygon/Rectangle
FrameFittingOption AutoFit 32,300 -> 44,868 of 44,868, preference
FrameFittingOption 1,251 of 1,251 per attribute, StyleUniqueId 6,424 ->
10,047 of 10,051, ObjectStyle OverprintStroke 0 -> 1,512 of 1,512,
StyleExportTagMap 0 -> 306 of 306 elements, export flags of every
style. Extras 94,157 -> 93,569: 444 FrameFittingOption elements and 168
SplitDocument and EmitCss values gone; 24 StyleUniqueId values are new,
in five 11.4 pairs whose IDML was exported by 11.0.
- Page GridStartingPoint from the u32 at 0 of chunk 0xCD04 (0
TopOutside, 4 CenterVertical; other codes are in no pair and are
left out).
- TOCStyle SetStoryDirection from the first u16 field of chunk 0x11605
(0 Horizontal, 1 Vertical). It is no longer a WHEN_WRITTEN key of
element_values.py (the regenerated file is unchanged).
- ObjectStyle StoryPreference OpticalMarginSize and
OpticalMarginAlignment from the f64 at 2 and u16 at 12 of chunk
0x285B, as in the story chunk 0x2EE.
Evidence in objects.md.
compare.py --exclude own/, trustworthy pairs: coverage 98.32 % ->
98.41 % (Page GridStartingPoint 10,080 missing -> 0, TOCStyle
SetStoryDirection 620 missing -> 0, object style OpticalMarginSize 261
and OpticalMarginAlignment 4 wrong -> 0), documents >= 99 % 225 -> 268;
all pairs 96.46 % -> 96.54 %. Extras unchanged on trustworthy pairs
(8,968); over all pairs +182, the new attribute on pages of stale pairs
that the reference does not have. No new failures.
Read class 0x660B (text kept from a placed EPS or PDF graphic) as a
page item and write it as EPSText: ItemTransform, PathBoundingBox
(chunk 0x154), EPSTextData (chunk 0x6611 in big-endian order without
two tail fields, base64), EPSTextAttributeBounds (chunk 0x6612) and
the text wrap. element_values.py collects the EPSText values every
element has.
compare.py --exclude own/:
- trustworthy 97.72% -> 97.90% (+22,108 values; EPSText 633 of 633
elements, with transform, bounds, text data and text wrap all equal)
- all pairs 95.89% -> 96.02%
- extra values unchanged in trustworthy pairs (26,256); all pairs
304,533 -> 305,985: 1 stale pair whose IDML lacks its EPS text
- not yet reproduced: EPSText StrokeType (634), OverprintFill (33),
StrokeDashAndGap (7)
Regenerate src/idml/element_values.xml from the 827 distinct IDML files
of the corpus (683 before). Values that now vary across the IDML files
drop out:
- Story AppliedNamedGrid, StoryPreference FrameType and
StoryOrientation (stories with named grids, frame grids or vertical
text)
- Page GridStartingPoint (28 pages of DOM 18)
- TOCStyle SetStoryDirection (3 styles are Vertical)
- 9 TextDefault, 2 CjkGridPreference and 1 IndexOptions preference values
element_values.py now collects ClippingPathSettings only for
ClippingType="None", the only case in which the converter writes the
element, and leaves user-named trap presets out of the TrapPreset list.
Without these two rules a DOM 12 file with its own trap preset and 8
images with a clipping path would have removed the values for every
document.
root_values.py read the text attribute table from src/idml/mod.rs,
which moved to attrs.rs; it now runs again. Its files stay pinned and
are not regenerated (idml-values.md says why).
compare.py --exclude own/ (803 pairs, 606 trustworthy):
- trustworthy coverage 97.95% -> 97.55% (12,036,295 -> 11,986,627 of
12,287,602); all pairs 96.12% -> 95.72%
- the loss is the dropped Story AppliedNamedGrid (19,416), FrameType
(19,368), Page GridStartingPoint (10,052), TOCStyle
SetStoryDirection (618) and StoryOrientation (214)
- extra values 26,257 -> 26,256 (all pairs 305,366 -> 303,866)
- conversion failures 0 of 803
The writer wrote these as literals. element_values.py now collects
Story, XmlStory, Story/StoryPreference, the InCopyExportOption of
stories, rectangles, ovals and polygons, the ClippingPathSettings of
images, PDF and EPS graphics, and Ink; the writer reads them from
element_values.xml after the values it reads from the INDD.
- UserText (a WhenWritten value) is written from version 11.2, where
IDML starts to have it (was 12).
- Ink ConvertToProcess is read from byte 56 after the ink name; it was
the only ink value that varies (3 inks true).
- InCopyExportOption of ovals and the EPS clipping values follow the
versions the corpus shows (ovals from DOM 8, EPS up to DOM 20).
compare.py --exclude own/:
- trustworthy value coverage 98.03% -> 98.03% (+771 values: UserText
768, ConvertToProcess 3); all pairs 96.12% -> 96.13% (+1,211)
- extra values: trustworthy unchanged; all pairs +43 (UserText in
stale pairs whose IDML is older)
- compare.py --all with schemas: 0 schema failures on pairs; files
without a reference as before
XMLImportPreference AllowTransform, ImportCALSTables,
ImportTextIntoTables, ImportToSelected, RemoveUnmatchedExisting,
RepeatTextElements and DictionaryPreference MergeUserDictionary are the
same in all 654 pairs. Two of the 683 IDML files differ; both were
exported by an earlier version than their INDD was last saved with, so
they are not pairs. element_values.py now leaves those files out for
these keys (LATER_INDD_EXCEPTIONS); idml-values.md records why.
compare.py --exclude own/: trustworthy value coverage 97.12% -> 97.15%
(+3,423 values, 7 keys x 489 pairs); all pairs 95.16% -> 95.19%
(+4,578). No key lost values; extra values unchanged.
The pasted smooth shade object of lowest UID with a constant shading
becomes a PastedSmoothShade whose contents are its numbers in big-endian
order, with the values every constant shade has in IDML.
Value coverage on trustworthy pairs: 87.08 % to 87.13 %.
Each assignment object becomes an Assignment with the values every IDML
has. Its name depends on the language of the computer that exported the
IDML, so it is left out of the output and of value coverage.
Value coverage on trustworthy pairs: 86.83 % to 86.86 %.
Styles.xml gets a TOCStyle for each TOC style object, with its name,
title, title style and numbering, anchor and line break settings, and
stories get AppliedTOCStyle through the table of contents object that
made them. Entries are not decoded yet.
Value coverage on trustworthy pairs: 84.29 % to 84.50 %.
Paragraph and character styles get Imported (the u16 after the style
kind) and StyleUniqueId (the GUID after the name) from the INDD, and the
values every non-root style has in IDML, such as PreviewColor, from
observation. The values generator leaves root styles out of the style
paths.
Value coverage on trustworthy pairs: 84.07 % to 84.29 %.
TextFramePreference gets the maximum column width, fixed column width,
auto-sizing minimums, text wrap override, column rule width and colour,
footnote spacings and the inset spacing (from the frame), read from
their chunks. Attributes that IDML writes only on some frames, with one
value wherever it does, are generated as WhenWritten values and also
give the versions from which column rules and footnotes exist.
Value coverage on trustworthy pairs: 82.03 % to 83.37 %.
designmap.xml gets the document's languages from their INDD objects,
with the quotes every IDML gives each language, the document users from
the document object, and the settings elements every IDML of the version
has (watermark, linked story and page item options, footnote and
endnote options and others) with their common values. User colours are
set by the exporting InDesign, not the INDD, and are left out of value
coverage.
Value coverage on trustworthy pairs: 81.65 % to 82.03 %.
Spreads get AllowPageShuffle and their FlattenerPreference, master
spreads ShowMasterItems, pages their tab order, overrides, layout grid
use, layout rule, colour, alternate layout and numbering descriptor,
sections their prefix, marker and alternate layout, and layers their
printing, guide, UI, wrap and colour settings. Interface colours are
named from one table shared with XML tags. Values every IDML has on
these elements, and the two built-in trap presets, are written from
observation.
Value coverage on trustworthy pairs: 80.03 % to 81.65 %.
Page items get Name, Visible, Locked, the interface change counts,
OverriddenPageItemProps, the layout constraints and the gradient angles
and highlights, read from their chunks and attribute lists, with the IDML
defaults where a chunk is absent. Groups take the gradient values their
children share. tools/element_values.py collects the values every IDML
of a version has on an element; the converter writes those of page items
and their export options, now for every version.
Value coverage on trustworthy pairs: 62.62 % to 80.03 %.