Files
docling-core/test/data/doc/barchart.out.dclg.xml
Panos Vagenas 0b7690509e feat(doclang): align with DocLang v0.6, add field region deser. (#636)
* feat(doclang): align with DocLang v0.6 picture model

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* feat(doclang): enhance picture metadata handling with custom fields

- Introduced support for custom metadata fields in the picture model, including summary, description, and SMILES.
- Updated serializer and deserializer to handle new custom vocabulary tags.
- Added tests for round-trip serialization and deserialization of picture metadata, ensuring correct handling of custom fields.

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* feat(doclang): deserialize field regions and add round-trip fixtures

- Parse `<field_region>`, `<field_item>`, `<key>`, `<value>`, `<hint>`, and checkbox markup into `FieldRegionItem` / field text items, including inline key/value bodies
- Add `test_field_region_doclang_roundtrip` and `test_kv_annot_doclang_roundtrip` with materialized `input.json`, `deserialized.json`, and `reserialized.dclg.xml` goldens under `test/data/doc/field_region_kv*/` and `test/data/doc/kv/*/`
- Assert lossless XML round-trip where supported today (`_KV_ANNOT_XML_LOSSLESS`); partial cases remain golden-locked pending list `<group>` and in-region `<heading>` handling

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

---------

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-06-11 12:30:09 +02:00

69 lines
1.1 KiB
XML
Vendored

<doclang>
<page_header>
<layer value="furniture"/>
<location value="73"/>
<location value="14"/>
<location value="222"/>
<location value="20"/>
Probability, Combinatorics and Control
</page_header>
<picture class="chart">
<label value="bar_chart"/>
<location value="104"/>
<location value="38"/>
<location value="401"/>
<location value="152"/>
<tabular>
<fcel/>
Number of impellers
<fcel/>
single-frequency
<fcel/>
multi-frequency
<nl/>
<fcel/>
1
<fcel/>
0.06
<fcel/>
0.16
<nl/>
<fcel/>
2
<fcel/>
0.12
<fcel/>
0.26
<nl/>
<fcel/>
3
<fcel/>
0.16
<fcel/>
0.27
<nl/>
<fcel/>
4
<fcel/>
0.14
<fcel/>
0.26
<nl/>
<fcel/>
5
<fcel/>
0.16
<fcel/>
0.25
<nl/>
<fcel/>
6
<fcel/>
0.24
<fcel/>
0.24
<nl/>
</tabular>
</picture>
</doclang>