mirror of
https://github.com/docling-project/docling-core.git
synced 2026-11-18 20:27:00 +00:00
* feat(doclang): add .dclx archive save and load support - Add `DoclingDocument.save_as_doclang_archive()` and `load_from_doclang_archive()` for DocLang OPC archives (`.dclx`) - Store markup in `document.xml` with page rasters under `pages/` and picture assets under `assets/` - Resolve relative `<src uri="..."/>` paths when loading from an extracted archive - Bump DocLang serialization to version `0.7` and update namespace/version golden fixtures - Restore picture images from archive-relative URIs via `DocLangDocDeserializer` (`media_root`) - Add safe zip extraction and archive path helpers in `docling_core.types.doc.utils` - Promote `doclang` to a runtime dependency (`>=0.7,<0.8`) on PyPI 0.7.0 - Remove `doclang` from dev dependency group and refresh `uv.lock` - Add `test/test_doclang_archive.py` with save, load, and roundtrip coverage - Add two-page archive fixtures under `test/data/doc/doclang_archive/` Signed-off-by: Panos Vagenas <pva@zurich.ibm.com> * feat(doclang): add support for `<description>` and `<summary>` Signed-off-by: Panos Vagenas <pva@zurich.ibm.com> --------- Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
166 lines
3.2 KiB
XML
Vendored
166 lines
3.2 KiB
XML
Vendored
<doclang>
|
|
<list>
|
|
<ldiv>
|
|
<marker>■</marker>
|
|
</ldiv>
|
|
</list>
|
|
<heading></heading>
|
|
<text></text>
|
|
<text></text>
|
|
<heading level="2"></heading>
|
|
<text></text>
|
|
<list>
|
|
<ldiv>
|
|
<marker>■</marker>
|
|
</ldiv>
|
|
<ldiv>
|
|
<marker>■</marker>
|
|
</ldiv>
|
|
<ldiv>
|
|
<marker>■</marker>
|
|
</ldiv>
|
|
<text></text>
|
|
<list class="ordered">
|
|
<ldiv/>
|
|
<ldiv/>
|
|
<ldiv/>
|
|
<text></text>
|
|
<list class="ordered">
|
|
<ldiv/>
|
|
</list>
|
|
</list>
|
|
<ldiv>
|
|
<marker>■</marker>
|
|
</ldiv>
|
|
</list>
|
|
<table>
|
|
<caption>This is the caption of table 1.</caption>
|
|
<fcel/>
|
|
Product
|
|
<fcel/>
|
|
Years
|
|
<lcel/>
|
|
<nl/>
|
|
<ucel/>
|
|
<fcel/>
|
|
2016
|
|
<fcel/>
|
|
2017
|
|
<nl/>
|
|
<fcel/>
|
|
Apple
|
|
<fcel/>
|
|
49823
|
|
<fcel/>
|
|
695944
|
|
<nl/>
|
|
</table>
|
|
<picture>
|
|
<caption>This is the caption of figure 1.</caption>
|
|
</picture>
|
|
<picture>
|
|
<caption>This is the caption of figure 2.</caption>
|
|
<src uri="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAAdElEQVRoBdXBAQEAAABAIP6ftkPJnMzJnMzJnMzJnMzJnMzJnMzJnMzJnMzJnMzJnMzJnMzJnMzJnMzJnMzJnMzJnMzJnMzJnMzJnMzJnMzJnMzJnMzJnMzJnMzJnMzJnMzJnMzJnMzJnMzJnMzJnMzJnMwFULoAQbykEYoAAAAASUVORK5CYII="/>
|
|
</picture>
|
|
<list>
|
|
<ldiv>
|
|
<marker>■</marker>
|
|
</ldiv>
|
|
</list>
|
|
<list>
|
|
<ldiv>
|
|
<marker>*</marker>
|
|
</ldiv>
|
|
<ldiv/>
|
|
</list>
|
|
<list>
|
|
<ldiv>
|
|
<marker>■</marker>
|
|
</ldiv>
|
|
<ldiv>
|
|
<marker>■</marker>
|
|
</ldiv>
|
|
<text></text>
|
|
<list>
|
|
<ldiv>
|
|
<marker>□</marker>
|
|
</ldiv>
|
|
<ldiv>
|
|
<marker>□</marker>
|
|
</ldiv>
|
|
<ldiv>
|
|
<marker>□</marker>
|
|
</ldiv>
|
|
</list>
|
|
</list>
|
|
<code>
|
|
<label value="Python"/>
|
|
<![CDATA[print("Hello world")]]> </code>
|
|
<formula></formula>
|
|
<text></text>
|
|
<code>
|
|
<label value="Python"/>
|
|
<![CDATA[print("Hello world")]]> </code>
|
|
<text></text>
|
|
<formula></formula>
|
|
<text></text>
|
|
<list class="ordered">
|
|
<ldiv>
|
|
<marker>(i)</marker>
|
|
</ldiv>
|
|
<ldiv>
|
|
<marker>(ii)</marker>
|
|
</ldiv>
|
|
<ldiv>
|
|
<marker>(iii)</marker>
|
|
</ldiv>
|
|
<text></text>
|
|
<list class="ordered">
|
|
<ldiv/>
|
|
<ldiv>
|
|
<marker>42.</marker>
|
|
</ldiv>
|
|
<text></text>
|
|
<list class="ordered">
|
|
<ldiv/>
|
|
<ldiv/>
|
|
</list>
|
|
<ldiv/>
|
|
</list>
|
|
<ldiv>
|
|
<marker>(iv)</marker>
|
|
</ldiv>
|
|
</list>
|
|
<list>
|
|
<ldiv/>
|
|
</list>
|
|
<text></text>
|
|
<picture>
|
|
<location value="5"/>
|
|
<location value="492"/>
|
|
<location value="15"/>
|
|
<location value="502"/>
|
|
<caption>Picture Caption</caption>
|
|
<description>Picture Description</description>
|
|
<summary>Picture Summary</summary>
|
|
</picture>
|
|
<picture>
|
|
<label value="pie_chart"/>
|
|
<location value="5"/>
|
|
<location value="492"/>
|
|
<location value="15"/>
|
|
<location value="502"/>
|
|
<caption>Picture Caption</caption>
|
|
<description>Picture Description</description>
|
|
<summary>Picture Summary</summary>
|
|
</picture>
|
|
<code>0 == 0</code>
|
|
<code>
|
|
<location value="5"/>
|
|
<location value="492"/>
|
|
<location value="15"/>
|
|
<location value="502"/>
|
|
with location
|
|
</code>
|
|
</doclang>
|