# Values written from IDML observation Some values the converter writes do not come from the INDD file. They are values that every IDML exported by InDesign in the corpus has. They are facts about InDesign's IDML output, not about the INDD format, and the evidence is the corpus IDML files alone. Why they are written: IDML consumers apply their own defaults to attributes that are missing. When those defaults differ from InDesign's, the layout differs. For example, a consumer that defaults to keeping all lines of a paragraph together breaks pages differently from a document whose root style says `KeepAllLinesTogether="false"`. ## Root style values The root styles are `[No paragraph style]`, `[No character style]`, the object style `[None]`, the cell style `[None]` and the table style `[No table style]`. Every corpus IDML has all five. `tools/root_values.py` reads `Resources/Styles.xml` of every corpus IDML and collects each attribute of the root styles, each `Properties` child, and each attribute of their child elements (for example `TextFramePreference` in the object style). It keeps a value when: - every IDML from some DOM version on has it, with the same value, and - the converter does not read it from the INDD. The kept values are in `src/idml/root_values.xml`, generated by that tool. The converter writes them on its root styles. A value the converter reads from the INDD takes precedence: for the paragraph and character root styles, attributes in the text attribute table (`attributes.md`) are left out of the file, and any attribute the INDD supplies is written from the INDD. The corpus has 240 INDD files with an IDML, which are 88 distinct IDML files. Their DOM versions are 7 (1 file), 12 (7 files) and 15 to 20 (80 files). Values that first appear after DOM 7 are written only for documents of that InDesign version or later (`MinimumVersion` in the file). | Root style | Values | Same in | Written for version | |---|---|---|---| | `[No paragraph style]` | 180 | 88 of 88 files | all | | | 14 | 87 of 87 files with DOM 12 or later | 12 and later | | | 30 | 80 of 80 files with DOM 15 or later | 15 and later | | `[No character style]` | 1 | 88 of 88 | all | | | 2 | 87 of 87 (DOM 12 or later) | 12 and later | | | 2 | 80 of 80 (DOM 15 or later) | 15 and later | | Object style `[None]` | 75 | 88 of 88 | all | | | 43 | 87 of 87 (DOM 12 or later) | 12 and later | | | 16 | 80 of 80 (DOM 15 or later) | 15 and later | | Cell style `[None]` | 1 | 88 of 88 | all | | Table style `[No table style]` | 105 | 88 of 88 | all | | | 10 | 87 of 87 (DOM 12 or later) | 12 and later | Among them are the keep settings of `[No paragraph style]`: `KeepAllLinesTogether="false"`, `KeepFirstLines="2"`, `KeepLastLines="2"`, `KeepWithNext="0"` and `KeepWithPrevious="false"`, in 88 of 88 files. **Left out because they vary between files:** - `[No paragraph style]`: `DiacriticPosition`, `KinsokuSet`, `Mojikumi`, `StyleUniqueId`, `TreatIdeographicSpaceAsSpace`, and the eight corner radii of paragraph borders and shading (12 or 1). - `[No character style]`: `StyleUniqueId`. - Object style `[None]`: `FrameFittingOption/FittingAlignment`, `StoryPreference/StoryDirection`, `TextFramePreference/ColumnRuleStrokeColor` and `TextFramePreference/ColumnRuleStrokeWidth`. **Left out because the converter reads them from the INDD:** 85 attributes of `[No paragraph style]`, listed in `attributes.md`. Some of these are also the same in every IDML; the INDD value is written. In every compared pair the converted root styles have all of them. The object, cell and table root styles get only observed values: the converter reads no attributes of these styles from the INDD yet. The cell and table root styles are written as new elements in `RootCellStyleGroup` and `RootTableStyleGroup`. ## Default numbering list The root paragraph style refers to `NumberingList/$ID/[Default]`. All 240 corpus IDML files have this element in `designmap.xml`, with the same attributes: `Name="$ID/[Default]"`, `ContinueNumbersAcrossStories="false"` and `ContinueNumbersAcrossDocuments="false"`. The converter writes it after `idPkg:Styles`, where the IDML schema puts it. ## Built-in stroke styles All 240 corpus IDML files list the same 18 `StrokeStyle` elements in `Resources/Graphic.xml`, in the same order, each with only `Self` and `Name` (`StrokeStyle/$ID/Solid`, `$ID/Solid`, and so on). The converter writes the same list, so every `StrokeType` it writes refers to an element in the package. ## Font platform name `PlatformName` is `$ID/` in all 4,464 `Font` elements of the corpus IDML files (`fonts.md`). The converter writes that value on every font. ## Not yet written `Resources/Preferences.xml` has more elements that every corpus IDML has (`TextDefault`, `TextPreference`, `PageItemDefault`, `StoryPreference`, `FootnoteOption` and others). Many of their attributes are the same in all 88 files (for example 196 of the 276 attributes of `TextDefault`), but others vary and may be stored in the INDD. They are not written yet.