JATS: content of `<sub-article>` is not converted
Los mantenedores suelen responder en 2 días
Ya se ha fusionado un pull request relacionado.
- #4826 de @LubabaKhalid — fusionado
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 70/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Python
- Estrellas
- 70.1k
- Forks
- 5.3k
- Merge medio
- 3 d 4 h
- PR fusionados (30 d)
- 212
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de docling-project/docling
-
METS GBS: a page naming an archive member the tar does not hold raises KeyError and fails the whole documentPosiblemente ocupada @Krushil-Dhankecha la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
docling-project/docling#5205 ·
Los mantenedores suelen responder en 2 días
-
HTML conversion joins words separated by a source newline between inline elementsPosiblemente ocupada @flysheep-ai la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
docling-project/docling#5194 ·
Los mantenedores suelen responder en 2 días
-
[VLM] granite_vision preset produces empty output and runs ~3× slower with Granite Vision 3.3-2B than with Granite Vision 4.1-4BQuizá libre de nuevo @prassu017 la tomó hace 10 días y no hay ningún pull request abierto. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
docling-project/docling#5068 · 5 comentarios ·
Los mantenedores suelen responder en 2 días
-
Pillow dependency issue for remediating CVE-2026-112393Quizá libre de nuevo @Batianxieshen1 la tomó hace 14 días y no hay ningún pull request abierto. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
docling-project/docling#4968 · 6 comentarios ·
Los mantenedores suelen responder en 2 días
-
ASR: MLX Whisper ignores the `temperature` optionPosiblemente ocupada @YHC66 la tomó hace 21 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
docling-project/docling#4872 ·
Los mantenedores suelen responder en 2 días
Todos los issues de docling-project/docling
Issues similares
-
[yugabyted] xcluster set_up and add_to_replication fail for database names containing - . or (Abiertokind/bug priority/medium qa_automation
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
yugabyte/yugabyte-db#37324 ·
Los mantenedores suelen responder en 1 día
-
good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 87/100
btclib-org/btclib-node#2260 ·
Los mantenedores suelen responder en 1 día
-
ChatBedrockConverse changes the keys of JSON tool results to camelCase (`order_id` becomes `orderId`)Posiblemente ocupada @geyazheng la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
langchain-ai/langchain-aws#1469 ·
Los mantenedores suelen responder en 1 día
-
GCToggler leaves collection enabled if the body re-enables itPosiblemente ocupada @Gambit-Checkmate la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 7 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
EESSI/docs#949 · 1 comentario ·
Los mantenedores suelen responder en 1 día