ddn.odf.common.options
Read, write, and validation options for ODF document processing.
Provides separate option structs for reading, writing, and validating ODF documents, with shared enums for common settings like validation level and compatibility target.
All options default to preservation-safe, permissive behavior.
Types 8
Controls how strictly ODF conformance rules are enforced.
Controls the level of validation applied during read or write operations.
Specifies the ODF compatibility target for serialization and validation.
Controls how unknown XML elements and attributes are handled.
Controls how unknown package entries are handled.
Options for reading (opening) an ODF document.
Defaults are preservation-safe and permissive.
OdfStrictness strictnessStrictness level for parsing. Defaults to `PERMISSIVE`.OdfValidationLevel validationLevelValidation level applied during read. Defaults to `MINIMAL`.OdfUnknownXmlPolicy unknownXmlPolicyHow to handle unknown XML elements and attributes. Defaults to `PRESERVE`.OdfUnknownEntryPolicy unknownEntryPolicyHow to handle unknown package entries. Defaults to `PRESERVE`.OdfCompatibilityTarget compatibilityTargetCompatibility target for interpreting documents. Defaults to `ODF_1_2_COMPAT`.OdfDiagnosticCollector * diagnosticsOptional diagnostic collector. When provided, diagnostics are collected here instead of being thrown as exceptions (in permissive mode).bool useExtensionHintWhen `true`, extension hints from the file extension are used as a secondary signal when the package MIME data is missing or ambiguous. Defaults to `true`.Options for writing (saving) an ODF document.
Defaults produce deterministic output with preservation of unknown content.
OdfStrictness strictnessStrictness level for serialization. Defaults to `PERMISSIVE`.OdfCompatibilityTarget compatibilityTargetCompatibility target for output. Defaults to `ODF_1_2_COMPAT`.bool preserveUnknownWhen `true`, unknown XML subtrees and package entries preserved from the original document are written back. Defaults to `true`.bool deterministicWhen `true`, the output is deterministic: namespace declarations, attribute ordering, and entry ordering are stable across runs. Defaults to `true`.bool prettyPrintWhen `true`, the output XML is pretty-printed with indentation. Defaults to `false`.string indentationIndentation string used when `prettyPrint` is `true`. Defaults to three spaces.OdfDiagnosticCollector * diagnosticsOptional diagnostic collector for write-time warnings.OdfValidationLevel validationLevelValidation level applied to the output before writing. Defaults to `NONE`.Options for validating an ODF document.
These options control what checks are performed and how results are reported.
OdfValidationLevel validationLevelValidation level. Defaults to `STANDARD`.OdfCompatibilityTarget compatibilityTargetCompatibility target for validation rules. Defaults to `ODF_1_2`.OdfDiagnosticCollector * diagnosticsOptional diagnostic collector. When provided, validation results are collected here. Otherwise, a temporary collector is used and results are available from the validation function return value.bool stopOnFirstFatalWhen `true`, validation stops after the first fatal error. Defaults to `false`.