JATS: content of `<sub-article>` is not converted
メンテナーはふだん 2 日以内に返信
関連するプルリクエストがすでにマージされています。
- #4826 @LubabaKhalid による — マージ済み
評価
調査の方向性
Start with docling/backend/xml/jats_backend.py around JatsDocumentBackend.convert() at lines 292–299, where the issue says only the first //body and //back are walked. Use the provided minimal JATS input to reproduce the missing ALPHA-SUB text and inspect the existing XML backend tests for a place to add a fixture. Done means the sub-article text appears in the converted document and the test covers the main article text as well.
索引モデルが issue の本文から書いたものです。
説明
Bug
A follow-up to #3583, split out as one narrow case.
JatsDocumentBackend.convert() walks only the first //body and the first //back (jats_backend.py#L292-L299 at v2.138.0). A <sub-article>'s own body is never reached, so none of its text reaches the document.
Publishers use <sub-article> for published peer-review records, author responses, translated abstracts and decision letters. In two PLOS Computational Biology articles we checked, the review record holds 127 and 109 paragraphs longer than 60 characters, and none of them is in the conversion.
Minimal input (after the prologue):
<front><article-meta><title-group><article-title>Control</article-title></title-group></article-meta></front>
<body><sec><title>S</title><p>ALPHA-MAIN paragraph.</p></sec></body>
<sub-article article-type="author-comment" id="sub1"><body><p>ALPHA-SUB reviewer paragraph.</p></body></sub-article>
</article>
Observed on v2.138.0 (a76ae4b6) and on main (f0d90989), unchanged since 2.131.0: ALPHA-MAIN is in the document; ALPHA-SUB is not, anywhere in export_to_dict().
Is skipping <sub-article> intended? If not, how would you like it represented: for example, as a separate section, or in a different content layer? We're happy to contribute the fixture and a test.
Steps to reproduce
Save the article as article.xml, then:
from docling.document_converter import DocumentConverter
doc = DocumentConverter().convert("article.xml").document
print(doc.export_to_markdown())
print([(t.text, t.hyperlink) for t in doc.texts])
Every article starts with this prologue. The backend needs a DOCTYPE.
<?xml version="1.0"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.3 20210610//EN" "JATS-journalpublishing1-3.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" article-type="research-article">
Docling version
v2.138.0 (a76ae4b6) and main (f0d90989), each installed as docling-slim[standard] from git.
Python version
3.14.7
- 主要言語
- Python
- スター
- 70.1k
- フォーク
- 5.3k
- 平均マージ
- 3日 4時間
- マージ済み PR(30日)
- 212
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
docling-project/docling のほかの issue
-
METS GBS: a page naming an archive member the tar does not hold raises KeyError and fails the whole document対応中かも @Krushil-Dhankecha が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
docling-project/docling#5205 ·
メンテナーはふだん 2 日以内に返信
-
HTML conversion joins words separated by a source newline between inline elements対応中かも @flysheep-ai が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
docling-project/docling#5194 ·
メンテナーはふだん 2 日以内に返信
-
[VLM] granite_vision preset produces empty output and runs ~3× slower with Granite Vision 3.3-2B than with Granite Vision 4.1-4B再び着手できるかも @prassu017 が 11 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
docling-project/docling#5068 · コメント 5 件 ·
メンテナーはふだん 2 日以内に返信
-
Pillow dependency issue for remediating CVE-2026-112393再び着手できるかも @Batianxieshen1 が 14 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
docling-project/docling#4968 · コメント 6 件 ·
メンテナーはふだん 2 日以内に返信
-
ASR: MLX Whisper ignores the `temperature` option対応中かも @YHC66 が 21 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
docling-project/docling#4872 ·
メンテナーはふだん 2 日以内に返信
docling-project/docling の issue をすべて見る
似ている issue
-
kind/bug priority/medium qa_automation
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
yugabyte/yugabyte-db#37324 ·
メンテナーはふだん 1 日以内に返信
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 87/100
btclib-org/btclib-node#2260 ·
メンテナーはふだん 1 日以内に返信
-
ChatBedrockConverse changes the keys of JSON tool results to camelCase (`order_id` becomes `orderId`)対応中かも @geyazheng が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
langchain-ai/langchain-aws#1469 ·
メンテナーはふだん 1 日以内に返信
-
GCToggler leaves collection enabled if the body re-enables it対応中かも @Gambit-Checkmate が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 7 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信