diff options
| author | Julia Diaz <[email protected]> | 2023-10-17 17:16:00 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-10-17 09:16:00 -0700 |
| commit | fa3513b104e089a8969f3ae0dab98eba78b1a942 (patch) | |
| tree | f1d89ccbf6ee52fd22ec6cc77e161da2403a54cb /test/jats-reader.xml | |
| parent | 802c610923b364a4a10f59eccb5f1d0b7176ab53 (diff) | |
JATS reader: fix handling of alt-text (#9134)
Previously we were looking for an attribute that doesn't exist in
JATS; alt-text is provided by a child element.
Closes #9130.
Diffstat (limited to 'test/jats-reader.xml')
| -rw-r--r-- | test/jats-reader.xml | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/test/jats-reader.xml b/test/jats-reader.xml index 3fbf98d9d..ce8708ba8 100644 --- a/test/jats-reader.xml +++ b/test/jats-reader.xml @@ -193,19 +193,26 @@ <title>Formulae with miscelaneus elements</title> <p>Regardless of whether or not they are inside a paragraph, should be wrapped in a div, and displayed in a block:</p> <p><bold>Inside a paragraph:</bold></p> - <p>Einstein showed that + <p>Einstein definitely showed that <disp-formula> <abstract> <p>Abstract text</p> </abstract> - <graphic xlink:href="https://lh3.googleusercontent.com/dB7iirJ3ncQaVMBGE2YX-WCeoAVIChb6NAzoFcKCFChMsrixJvD7ZRbvcaC-ceXEzXYaoH4K5vaoRDsUyBHFkpIDPnsn3bnzovbvi0a2Gg=s660"> - <alt-text>Alternative text 1</alt-text> - <caption><p>Google doodle from 14 March 2003</p></caption> + <graphic id="graphic001" + xlink:href="https://lh3.googleusercontent.com/dB7iirJ3ncQaVMBGE2YX-WCeoAVIChb6NAzoFcKCFChMsrixJvD7ZRbvcaC-ceXEzXYaoH4K5vaoRDsUyBHFkpIDPnsn3bnzovbvi0a2Gg=s660" + xlink:title="This is the title of the graphic" + xlink:role="This is the role of the graphic"> + <alt-text>Alternative text of the graphic</alt-text> + <caption> + <title>This is the title of the caption</title> + <p>Google doodle from 14 March 2003</p></caption> </graphic> <alternatives> <tex-math><![CDATA[e=mc^2]]></tex-math> <mml:math display="block" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mi>e</mml:mi><mml:mo>=</mml:mo><mml:mi>m</mml:mi><mml:msup><mml:mi>c</mml:mi><mml:mn>2</mml:mn></mml:msup></mml:mrow></mml:math> - <graphic xlink:href="https://lh3.googleusercontent.com/dB7iirJ3ncQaVMBGE2YX-WCeoAVIChb6NAzoFcKCFChMsrixJvD7ZRbvcaC-ceXEzXYaoH4K5vaoRDsUyBHFkpIDPnsn3bnzovbvi0a2Gg=s660"> + <graphic id="graphic001" + xlink:href="https://lh3.googleusercontent.com/dB7iirJ3ncQaVMBGE2YX-WCeoAVIChb6NAzoFcKCFChMsrixJvD7ZRbvcaC-ceXEzXYaoH4K5vaoRDsUyBHFkpIDPnsn3bnzovbvi0a2Gg=s660" + xlink:title="Title 2"> <alt-text>Alternative text 2</alt-text> <caption><p>Google doodle from 14 March 2003</p></caption> </graphic> @@ -218,14 +225,18 @@ <abstract> <p>Abstract text</p> </abstract> - <graphic xlink:href="https://lh3.googleusercontent.com/dB7iirJ3ncQaVMBGE2YX-WCeoAVIChb6NAzoFcKCFChMsrixJvD7ZRbvcaC-ceXEzXYaoH4K5vaoRDsUyBHFkpIDPnsn3bnzovbvi0a2Gg=s660"> + <graphic id="graphic003" + xlink:href="https://lh3.googleusercontent.com/dB7iirJ3ncQaVMBGE2YX-WCeoAVIChb6NAzoFcKCFChMsrixJvD7ZRbvcaC-ceXEzXYaoH4K5vaoRDsUyBHFkpIDPnsn3bnzovbvi0a2Gg=s660" + xlink:href="Title 3"> <alt-text>Alternative text 1</alt-text> <caption><p>Google doodle from 14 March 2003</p></caption> </graphic> <alternatives> <tex-math><![CDATA[e=mc^2]]></tex-math> <mml:math display="block" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mi>e</mml:mi><mml:mo>=</mml:mo><mml:mi>m</mml:mi><mml:msup><mml:mi>c</mml:mi><mml:mn>2</mml:mn></mml:msup></mml:mrow></mml:math> - <graphic xlink:href="https://lh3.googleusercontent.com/dB7iirJ3ncQaVMBGE2YX-WCeoAVIChb6NAzoFcKCFChMsrixJvD7ZRbvcaC-ceXEzXYaoH4K5vaoRDsUyBHFkpIDPnsn3bnzovbvi0a2Gg=s660"> + <graphic id="graphic004" + xlink:href="https://lh3.googleusercontent.com/dB7iirJ3ncQaVMBGE2YX-WCeoAVIChb6NAzoFcKCFChMsrixJvD7ZRbvcaC-ceXEzXYaoH4K5vaoRDsUyBHFkpIDPnsn3bnzovbvi0a2Gg=s660" + xlink:href="Title 4"> <alt-text>Alternative text 2</alt-text> <caption><p>Google doodle from 14 March 2003</p></caption> </graphic> @@ -234,6 +245,15 @@ <p>This formula is important because…</p> </sec> </sec> +<sec id="figures"> + <fig id="fig-1"> + <caption> + <p>bar</p> + </caption> + <alt-text>alternative-decription</alt-text> + <graphic xlink:href="foo.png" xlink:alt-text="baz" /> + </fig> +</sec> <sec id="code-blocks"> <title>Code Blocks</title> <p>Code:</p> |
