Skip to content

feat(doclang): add partial DocLang 0.8 support with multiple captions - #880

Merged
vagenas merged 3 commits into
docling-project:mainfrom
DanielNg0729:chore/doclang-0.8
Oct 21, 2026
Merged

vagenas merged 3 commits into
docling-project:mainfrom
DanielNg0729:chore/doclang-0.8

Conversation

@DanielNg0729

Copy link
Copy Markdown
Member

Hi maintainers, this PR moves docling-core to DocLang 0.8. doclang 0.8.0 was released on 2026-10-15. It adds <track> (doclang-project/doclang#175), whole-track audio/ and video/ parts in pack(), more than one <caption> in an element head, and version-specific validation.

This is the first step for the <track> support that we discussed in docling-project/docling#4752. I keep it separate, so that the <track> PR only adds the new element.

Changes

  • pyproject.toml: doclang>=0.8,<0.9 for the runtime dependency and the dclq extra, and doclang[schematron-saxon]>=0.8,<0.9 in the dev group.
  • uv.lock: only doclang changes (0.7.3 to 0.8.0).
  • _DOCLANG_VERSION is now "0.8". The serializer writes it when include_version=True (the default), and .dclx archives use it too.
  • Two golden files change only on line 1, from version="0.7" to version="0.8":
    • tests/data/doc/include_namespace_and_version.gt.dclg.xml
    • tests/data/doc/deserialize_include_namespace_and_version.gt.dclg.xml

What does not change

  • The DoclingDocument model and its schema version (1.10.0). So no projector is necessary.
  • The deserializer does not read the version attribute, so it still reads 0.7 documents. The test inputs that declare version="0.7" stay as they are. doclang 0.8 still bundles the 0.7 schema, so they validate against it.
  • The serializer output does not change, apart from the declared version.

Signed-off-by: Daniel Nguyen <danielnguyenh07@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

✅ DCO Check Passed

Thanks @DanielNg0729, all your commits are properly signed off. 🎉

@DanielNg0729 DanielNg0729 changed the title chore(doclang): align w doclang 0.8 chore(doclang): align with doclang version 0.8.0 Oct 16, 2026
@mergify

mergify Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 All 2 merge protections satisfied — ready to merge.

Show 2 satisfied protections

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

🟢 Require two reviewer for test updates

When test data is updated, we require two reviewers

  • #approved-reviews-by >= 2

@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.66667% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
docling_core/transforms/deserializer/doclang.py 92.00% 2 Missing ⚠️
docling_core/transforms/serializer/doclang.py 90.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@DanielNg0729
DanielNg0729 requested a review from vagenas October 18, 2026 02:16
@DanielNg0729

Copy link
Copy Markdown
Member Author

Hi Dr. @vagenas, I saw that Docling v0.8.0 has officially been released!
This PR updates docling-core accordingly. Could you please take a look when you have a chance? Thank you!

DocLang 0.8 allows several captions in an element head. The serializer
now writes all captions of a floating item there, instead of the first
one in the head and the others as <text> next to it in a <group>. The
deserializer reads all head captions, and still reads <text> siblings
as captions, so that earlier output keeps loading.

<track> is not supported yet: the deserializer skips it with a warning,
instead of dropping its cues and leaking its chapter texts. The module
docstrings state the support as partial.

doclang 0.8 selects the schema by the declared version and warns when
there is none. The test helpers validate documents without a version
against _DOCLANG_VERSION. The data lint gets a dclx.version check that
warns on a missing version, and fails validation on a declared version
without schema rather than falling back to the latest one.

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
@vagenas vagenas changed the title chore(doclang): align with doclang version 0.8.0 feat(doclang): add partial DocLang 0.8 support with multiple captions Oct 20, 2026
@vagenas
vagenas requested review from cau-git and dolfim-ibm October 20, 2026 12:32
@vagenas
vagenas merged commit 1707a2d into docling-project:main Oct 21, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants