summaryrefslogtreecommitdiffstats
path: root/t/fmt/xml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 11:26:17 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 11:26:17 +0000
commit5df6c2aefebe3d2abcc939a88e294876d59f03ca (patch)
tree63fb332a0f21ddb91cb789c80cf64e134d373463 /t/fmt/xml
parentInitial commit. (diff)
downloadpo4a-5df6c2aefebe3d2abcc939a88e294876d59f03ca.tar.xz
po4a-5df6c2aefebe3d2abcc939a88e294876d59f03ca.zip
Adding upstream version 0.72.upstream/0.72
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 't/fmt/xml')
-rw-r--r--t/fmt/xml/attribute-novalue.desc2
-rw-r--r--t/fmt/xml/attribute-novalue.norm8
-rw-r--r--t/fmt/xml/attribute-novalue.po22
-rw-r--r--t/fmt/xml/attribute-novalue.pot22
-rw-r--r--t/fmt/xml/attribute-novalue.trans8
-rw-r--r--t/fmt/xml/attribute-novalue.xml6
-rw-r--r--t/fmt/xml/basic.norm96
-rw-r--r--t/fmt/xml/basic.po161
-rw-r--r--t/fmt/xml/basic.pot144
-rw-r--r--t/fmt/xml/basic.trans96
-rw-r--r--t/fmt/xml/basic.xml94
-rw-r--r--t/fmt/xml/cdata.norm9
-rw-r--r--t/fmt/xml/cdata.po39
-rw-r--r--t/fmt/xml/cdata.pot37
-rw-r--r--t/fmt/xml/cdata.trans9
-rw-r--r--t/fmt/xml/cdata.xml9
-rw-r--r--t/fmt/xml/comments.norm21
-rw-r--r--t/fmt/xml/comments.po42
-rw-r--r--t/fmt/xml/comments.pot38
-rw-r--r--t/fmt/xml/comments.trans21
-rw-r--r--t/fmt/xml/comments.xml19
-rw-r--r--t/fmt/xml/inside-foldattribute.norm8
-rw-r--r--t/fmt/xml/inside-foldattribute.po35
-rw-r--r--t/fmt/xml/inside-foldattribute.pot31
-rw-r--r--t/fmt/xml/inside-foldattribute.trans8
-rw-r--r--t/fmt/xml/inside-foldattribute.xml8
-rw-r--r--t/fmt/xml/options.desc1
-rw-r--r--t/fmt/xml/options.norm31
-rw-r--r--t/fmt/xml/options.po82
-rw-r--r--t/fmt/xml/options.pot72
-rw-r--r--t/fmt/xml/options.trans31
-rw-r--r--t/fmt/xml/options.xml31
-rw-r--r--t/fmt/xml/placeholder-empty.norm6
-rw-r--r--t/fmt/xml/placeholder-empty.po35
-rw-r--r--t/fmt/xml/placeholder-empty.pot32
-rw-r--r--t/fmt/xml/placeholder-empty.trans6
-rw-r--r--t/fmt/xml/placeholder-empty.xml6
37 files changed, 1326 insertions, 0 deletions
diff --git a/t/fmt/xml/attribute-novalue.desc b/t/fmt/xml/attribute-novalue.desc
new file mode 100644
index 0000000..df7c5fe
--- /dev/null
+++ b/t/fmt/xml/attribute-novalue.desc
@@ -0,0 +1,2 @@
+# Test that XML allows attributes with no value when instructed to
+-o attributes='<video>text'
diff --git a/t/fmt/xml/attribute-novalue.norm b/t/fmt/xml/attribute-novalue.norm
new file mode 100644
index 0000000..975fc5f
--- /dev/null
+++ b/t/fmt/xml/attribute-novalue.norm
@@ -0,0 +1,8 @@
+<!-- po4a used to choke on '<video controls' tag, reporting Bad attribute syntax -->
+<!-- See also https://github.com/mquinson/po4a/issues/178 -->
+
+
+<?xml version='1.0' encoding="UTF-8"?>
+<doc>
+ <video controls text="some text to translate"/>
+</doc>
diff --git a/t/fmt/xml/attribute-novalue.po b/t/fmt/xml/attribute-novalue.po
new file mode 100644
index 0000000..7dcfa32
--- /dev/null
+++ b/t/fmt/xml/attribute-novalue.po
@@ -0,0 +1,22 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2010-11-03 22:18+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. type: Attribute 'text' of: <doc><video>
+#: attribute-novalue.xml:5
+msgid "some text to translate"
+msgstr "SOME TEXT TO TRANSLATE"
diff --git a/t/fmt/xml/attribute-novalue.pot b/t/fmt/xml/attribute-novalue.pot
new file mode 100644
index 0000000..901afad
--- /dev/null
+++ b/t/fmt/xml/attribute-novalue.pot
@@ -0,0 +1,22 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2010-11-03 22:18+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. type: Attribute 'text' of: <doc><video>
+#: attribute-novalue.xml:5
+msgid "some text to translate"
+msgstr ""
diff --git a/t/fmt/xml/attribute-novalue.trans b/t/fmt/xml/attribute-novalue.trans
new file mode 100644
index 0000000..4a0730c
--- /dev/null
+++ b/t/fmt/xml/attribute-novalue.trans
@@ -0,0 +1,8 @@
+<!-- po4a used to choke on '<video controls' tag, reporting Bad attribute syntax -->
+<!-- See also https://github.com/mquinson/po4a/issues/178 -->
+
+
+<?xml version='1.0' encoding="UTF-8"?>
+<doc>
+ <video controls text="SOME TEXT TO TRANSLATE"/>
+</doc>
diff --git a/t/fmt/xml/attribute-novalue.xml b/t/fmt/xml/attribute-novalue.xml
new file mode 100644
index 0000000..37c3922
--- /dev/null
+++ b/t/fmt/xml/attribute-novalue.xml
@@ -0,0 +1,6 @@
+<!-- po4a used to choke on '<video controls' tag, reporting Bad attribute syntax -->
+<!-- See also https://github.com/mquinson/po4a/issues/178 -->
+<?xml version='1.0' encoding="UTF-8"?>
+<doc>
+ <video controls text="some text to translate"/>
+</doc>
diff --git a/t/fmt/xml/basic.norm b/t/fmt/xml/basic.norm
new file mode 100644
index 0000000..cfbdd0e
--- /dev/null
+++ b/t/fmt/xml/basic.norm
@@ -0,0 +1,96 @@
+<?xml version='1.0' encoding="UTF-8"?>
+
+<!-- $Header: foo,v 1.1 2006/12/31 23:59:59 noone Exp $ -->
+
+
+<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
+
+<guide link="/links/link.xml">
+<title>A Guide</title>
+
+<author title="Author">
+ <mail link="first.mail.org">First Author</mail>
+</author>
+
+<abstract>
+An Abstract
+</abstract>
+
+<!-- The content of this document is licensed under the XXX license -->
+<!-- See bla bla -->
+
+
+<license/>
+
+<version>1.2</version>
+<date>2006-012-31</date>
+
+<chapter>
+<title>About foo</title>
+<section>
+<title>Fist Title</title>
+<body>
+
+<p>
+The <c>foo</c> is a <e>foo</e> foo. foo foo foo foo foo foo foo foo foo foo
+foo foo foo foo foo foo foo foo foo foo foo foo foo foo.
+</p>
+
+<p>
+bar bar foo bar bar bar foo bar bar bar foo bar bar bar foo bar bar bar foo
+bar. bar bar foo bar bar bar foo bar bar bar foo bar bar bar foo bar bar
+bar foo bar.
+</p>
+
+</body>
+</section>
+<section>
+<title>Second Title</title>
+<body>
+
+<p>
+bar bar foo bar bar bar foo bar bar bar foo bar bar bar foo bar bar bar foo
+bar. bar bar foo bar bar bar foo bar bar bar foo bar bar bar foo bar bar
+bar foo bar.
+</p>
+
+</body>
+</section>
+<section>
+<title>Third Title</title>
+<body>
+
+<p>
+<!--
+ Some comment that is added to the PO file
+-->
+bar bar foo bar bar bar foo bar bar bar foo bar bar bar foo bar bar bar foo
+bar. bar <brite>bar foo</brite> bar bar bar foo bar bar bar foo bar bar bar
+foo bar bar bar foo bar. The <path>file</path> foo.
+</p>
+
+<pre caption="My caption">
+a command
+verbatim
+text
+</pre>
+
+<!--
+ Another comment that is not added to the PO file
+-->
+
+<p>foo</p>
+
+<pre caption="My caption">
+a <i>command</i>
+ verbatim
+text
+toto <comment>tata tutu</comment>.
+titi
+</pre>
+
+</body>
+</section>
+</chapter>
+
+</guide>
diff --git a/t/fmt/xml/basic.po b/t/fmt/xml/basic.po
new file mode 100644
index 0000000..35549f9
--- /dev/null
+++ b/t/fmt/xml/basic.po
@@ -0,0 +1,161 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2006-12-31 17:11+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. type: Attribute 'link' of: <guide>
+#: basic.xml:7
+msgid "/links/link.xml"
+msgstr ""
+
+#. type: Content of: <guide><title>
+#: basic.xml:8
+msgid "A Guide"
+msgstr "A GUIDE"
+
+#. type: Attribute 'title' of: <guide><author>
+#: basic.xml:10
+msgid "Author"
+msgstr "AUTHOR"
+
+#. type: Content of: <guide><author>
+#: basic.xml:11
+#, no-wrap
+msgid " <mail link=\"first.mail.org\">First Author</mail>\n"
+msgstr " <mail link=\"first.mail.org\">FIRST AUTHOR</mail>\n"
+
+#. type: Content of: <guide><abstract>
+#: basic.xml:15
+msgid "An Abstract"
+msgstr "AN ABSTRACT"
+
+#. type: Content of: <guide><version>
+#: basic.xml:23
+#, no-wrap
+msgid "1.2"
+msgstr "1.2"
+
+#. type: Content of: <guide><date>
+#: basic.xml:24
+#, no-wrap
+msgid "2006-012-31"
+msgstr ""
+
+#. type: Content of: <guide><chapter><title>
+#: basic.xml:27
+msgid "About foo"
+msgstr "ABOUT FOO"
+
+#. type: Content of: <guide><chapter><section><title>
+#: basic.xml:29
+msgid "Fist Title"
+msgstr "FIRST TITLE"
+
+#. type: Content of: <guide><chapter><section><body><p>
+#: basic.xml:33
+msgid ""
+"The <c>foo</c> is a <e>foo</e> foo. foo foo foo foo foo foo foo foo foo foo "
+"foo foo foo foo foo foo foo foo foo foo foo foo foo foo."
+msgstr ""
+"THE <c>FOO</c> IS A <e>FOO</e> FOO. FOO FOO FOO FOO FOO FOO FOO FOO FOO FOO "
+"FOO FOO FOO FOO FOO FOO FOO FOO FOO FOO FOO FOO FOO FOO."
+
+#. type: Content of: <guide><chapter><section><body><p>
+#: basic.xml:39 basic.xml:51
+msgid ""
+"bar bar foo bar bar bar foo bar bar bar foo bar bar bar foo bar bar bar foo "
+"bar. bar bar foo bar bar bar foo bar bar bar foo bar bar bar foo bar bar "
+"bar foo bar."
+msgstr ""
+"BAR BAR FOO BAR BAR BAR FOO BAR BAR BAR FOO BAR BAR BAR FOO BAR BAR BAR FOO "
+"BAR. BAR BAR FOO BAR BAR BAR FOO BAR BAR BAR FOO BAR BAR BAR FOO BAR BAR "
+"BAR FOO BAR."
+
+#. type: Content of: <guide><chapter><section><title>
+#: basic.xml:47
+msgid "Second Title"
+msgstr "SECOND TITLE"
+
+#. type: Content of: <guide><chapter><section><title>
+#: basic.xml:59
+msgid "Third Title"
+msgstr "THIRD TITLE"
+
+#
+#. Some comment that is added to the PO file
+#
+#. type: Content of: <guide><chapter><section><body><p>
+#: basic.xml:63
+msgid ""
+"bar bar foo bar bar bar foo bar bar bar foo bar bar bar foo bar bar bar foo "
+"bar. bar <brite>bar foo</brite> bar bar bar foo bar bar bar foo bar bar bar "
+"foo bar bar bar foo bar. The <path>file</path> foo."
+msgstr ""
+"BAR BAR FOO BAR BAR BAR FOO BAR BAR BAR FOO BAR BAR BAR FOO BAR BAR BAR FOO "
+"BAR. BAR <brite>BAR FOO</brite> BAR BAR BAR FOO BAR BAR BAR FOO BAR BAR BAR "
+"FOO BAR BAR BAR FOO BAR. THE <path>FILE</path> FOO."
+
+#. type: Attribute 'caption' of: <guide><chapter><section><body><pre>
+#: basic.xml:71 basic.xml:82
+msgid "My caption"
+msgstr "MY CAPTION"
+
+#. type: Content of: <guide><chapter><section><body><pre>
+#: basic.xml:72
+#, no-wrap
+msgid ""
+"a command\n"
+"verbatim\n"
+"text\n"
+msgstr ""
+"A COMMAND\n"
+"VERBATIM\n"
+"TEXT\n"
+
+#. type: Content of: <guide><chapter><section><body><p>
+#: basic.xml:80
+msgid "foo"
+msgstr "FOO"
+
+#. type: Content of: <guide><chapter><section><body><pre>
+#: basic.xml:83
+#, no-wrap
+msgid ""
+"a <i>command</i>\n"
+" verbatim\n"
+"text\n"
+"toto "
+msgstr ""
+"A <i>COMMAND</i>\n"
+" VERBATIM\n"
+"TEXT\n"
+"TOTO "
+
+#. type: Content of: <guide><chapter><section><body><pre><comment>
+#: basic.xml:86
+#, no-wrap
+msgid "tata tutu"
+msgstr "TATA TUTU"
+
+#. type: Content of: <guide><chapter><section><body><pre>
+#: basic.xml:86
+#, no-wrap
+msgid ""
+".\n"
+"titi\n"
+msgstr ""
+".\n"
+"TITI\n"
diff --git a/t/fmt/xml/basic.pot b/t/fmt/xml/basic.pot
new file mode 100644
index 0000000..5afe2fb
--- /dev/null
+++ b/t/fmt/xml/basic.pot
@@ -0,0 +1,144 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2006-12-31 17:11+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. type: Attribute 'link' of: <guide>
+#: basic.xml:7
+msgid "/links/link.xml"
+msgstr ""
+
+#. type: Content of: <guide><title>
+#: basic.xml:8
+msgid "A Guide"
+msgstr ""
+
+#. type: Attribute 'title' of: <guide><author>
+#: basic.xml:10
+msgid "Author"
+msgstr ""
+
+#. type: Content of: <guide><author>
+#: basic.xml:11
+#, no-wrap
+msgid " <mail link=\"first.mail.org\">First Author</mail>\n"
+msgstr ""
+
+#. type: Content of: <guide><abstract>
+#: basic.xml:15
+msgid "An Abstract"
+msgstr ""
+
+#. type: Content of: <guide><version>
+#: basic.xml:23
+#, no-wrap
+msgid "1.2"
+msgstr ""
+
+#. type: Content of: <guide><date>
+#: basic.xml:24
+#, no-wrap
+msgid "2006-012-31"
+msgstr ""
+
+#. type: Content of: <guide><chapter><title>
+#: basic.xml:27
+msgid "About foo"
+msgstr ""
+
+#. type: Content of: <guide><chapter><section><title>
+#: basic.xml:29
+msgid "Fist Title"
+msgstr ""
+
+#. type: Content of: <guide><chapter><section><body><p>
+#: basic.xml:33
+msgid ""
+"The <c>foo</c> is a <e>foo</e> foo. foo foo foo foo foo foo foo foo foo foo "
+"foo foo foo foo foo foo foo foo foo foo foo foo foo foo."
+msgstr ""
+
+#. type: Content of: <guide><chapter><section><body><p>
+#: basic.xml:39 basic.xml:51
+msgid ""
+"bar bar foo bar bar bar foo bar bar bar foo bar bar bar foo bar bar bar foo "
+"bar. bar bar foo bar bar bar foo bar bar bar foo bar bar bar foo bar bar "
+"bar foo bar."
+msgstr ""
+
+#. type: Content of: <guide><chapter><section><title>
+#: basic.xml:47
+msgid "Second Title"
+msgstr ""
+
+#. type: Content of: <guide><chapter><section><title>
+#: basic.xml:59
+msgid "Third Title"
+msgstr ""
+
+#
+#. Some comment that is added to the PO file
+#
+#. type: Content of: <guide><chapter><section><body><p>
+#: basic.xml:63
+msgid ""
+"bar bar foo bar bar bar foo bar bar bar foo bar bar bar foo bar bar bar foo "
+"bar. bar <brite>bar foo</brite> bar bar bar foo bar bar bar foo bar bar bar "
+"foo bar bar bar foo bar. The <path>file</path> foo."
+msgstr ""
+
+#. type: Attribute 'caption' of: <guide><chapter><section><body><pre>
+#: basic.xml:71 basic.xml:82
+msgid "My caption"
+msgstr ""
+
+#. type: Content of: <guide><chapter><section><body><pre>
+#: basic.xml:72
+#, no-wrap
+msgid ""
+"a command\n"
+"verbatim\n"
+"text\n"
+msgstr ""
+
+#. type: Content of: <guide><chapter><section><body><p>
+#: basic.xml:80
+msgid "foo"
+msgstr ""
+
+#. type: Content of: <guide><chapter><section><body><pre>
+#: basic.xml:83
+#, no-wrap
+msgid ""
+"a <i>command</i>\n"
+" verbatim\n"
+"text\n"
+"toto "
+msgstr ""
+
+#. type: Content of: <guide><chapter><section><body><pre><comment>
+#: basic.xml:86
+#, no-wrap
+msgid "tata tutu"
+msgstr ""
+
+#. type: Content of: <guide><chapter><section><body><pre>
+#: basic.xml:86
+#, no-wrap
+msgid ""
+".\n"
+"titi\n"
+msgstr ""
diff --git a/t/fmt/xml/basic.trans b/t/fmt/xml/basic.trans
new file mode 100644
index 0000000..a7b5fbc
--- /dev/null
+++ b/t/fmt/xml/basic.trans
@@ -0,0 +1,96 @@
+<?xml version='1.0' encoding="UTF-8"?>
+
+<!-- $Header: foo,v 1.1 2006/12/31 23:59:59 noone Exp $ -->
+
+
+<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
+
+<guide link="/links/link.xml">
+<title>A GUIDE</title>
+
+<author title="AUTHOR">
+ <mail link="first.mail.org">FIRST AUTHOR</mail>
+</author>
+
+<abstract>
+AN ABSTRACT
+</abstract>
+
+<!-- The content of this document is licensed under the XXX license -->
+<!-- See bla bla -->
+
+
+<license/>
+
+<version>1.2</version>
+<date>2006-012-31</date>
+
+<chapter>
+<title>ABOUT FOO</title>
+<section>
+<title>FIRST TITLE</title>
+<body>
+
+<p>
+THE <c>FOO</c> IS A <e>FOO</e> FOO. FOO FOO FOO FOO FOO FOO FOO FOO FOO FOO
+FOO FOO FOO FOO FOO FOO FOO FOO FOO FOO FOO FOO FOO FOO.
+</p>
+
+<p>
+BAR BAR FOO BAR BAR BAR FOO BAR BAR BAR FOO BAR BAR BAR FOO BAR BAR BAR FOO
+BAR. BAR BAR FOO BAR BAR BAR FOO BAR BAR BAR FOO BAR BAR BAR FOO BAR BAR
+BAR FOO BAR.
+</p>
+
+</body>
+</section>
+<section>
+<title>SECOND TITLE</title>
+<body>
+
+<p>
+BAR BAR FOO BAR BAR BAR FOO BAR BAR BAR FOO BAR BAR BAR FOO BAR BAR BAR FOO
+BAR. BAR BAR FOO BAR BAR BAR FOO BAR BAR BAR FOO BAR BAR BAR FOO BAR BAR
+BAR FOO BAR.
+</p>
+
+</body>
+</section>
+<section>
+<title>THIRD TITLE</title>
+<body>
+
+<p>
+<!--
+ Some comment that is added to the PO file
+-->
+BAR BAR FOO BAR BAR BAR FOO BAR BAR BAR FOO BAR BAR BAR FOO BAR BAR BAR FOO
+BAR. BAR <brite>BAR FOO</brite> BAR BAR BAR FOO BAR BAR BAR FOO BAR BAR BAR
+FOO BAR BAR BAR FOO BAR. THE <path>FILE</path> FOO.
+</p>
+
+<pre caption="MY CAPTION">
+A COMMAND
+VERBATIM
+TEXT
+</pre>
+
+<!--
+ Another comment that is not added to the PO file
+-->
+
+<p>FOO</p>
+
+<pre caption="MY CAPTION">
+A <i>COMMAND</i>
+ VERBATIM
+TEXT
+TOTO <comment>TATA TUTU</comment>.
+TITI
+</pre>
+
+</body>
+</section>
+</chapter>
+
+</guide>
diff --git a/t/fmt/xml/basic.xml b/t/fmt/xml/basic.xml
new file mode 100644
index 0000000..61998b7
--- /dev/null
+++ b/t/fmt/xml/basic.xml
@@ -0,0 +1,94 @@
+<?xml version='1.0' encoding="UTF-8"?>
+
+<!-- $Header: foo,v 1.1 2006/12/31 23:59:59 noone Exp $ -->
+
+<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
+
+<guide link="/links/link.xml">
+<title>A Guide</title>
+
+<author title="Author">
+ <mail link="first.mail.org">First Author</mail>
+</author>
+
+<abstract>
+An
+Abstract
+</abstract>
+
+<!-- The content of this document is licensed under the XXX license -->
+<!-- See bla bla -->
+<license/>
+
+<version>1.2</version>
+<date>2006-012-31</date>
+
+<chapter>
+<title>About foo</title>
+<section>
+<title>Fist Title</title>
+<body>
+
+<p>
+The <c>foo</c> is a <e>foo</e> foo.
+foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
+foo foo foo foo foo foo.
+</p>
+
+<p>
+bar bar foo bar bar bar foo bar bar bar foo bar bar bar foo bar bar bar
+foo bar. bar bar foo bar bar bar foo bar bar bar foo bar bar bar foo bar
+bar bar foo bar.
+</p>
+
+</body>
+</section>
+<section>
+<title>Second Title</title>
+<body>
+
+<p>
+bar bar foo bar bar bar foo bar bar bar foo bar bar bar foo bar bar bar
+foo bar. bar bar foo bar bar bar foo bar bar bar foo bar bar bar foo bar
+bar bar foo bar.
+</p>
+
+</body>
+</section>
+<section>
+<title>Third Title</title>
+<body>
+
+<p>
+bar bar foo bar bar bar foo bar bar bar foo bar bar bar foo bar bar bar
+foo bar. bar <brite>bar foo</brite> bar bar bar foo bar bar bar foo bar bar bar foo bar
+<!--
+ Some comment that is added to the PO file
+-->
+bar bar foo bar. The <path>file</path> foo.
+</p>
+
+<pre caption="My caption">
+a command
+verbatim
+text
+</pre>
+
+<!--
+ Another comment that is not added to the PO file
+-->
+<p>foo</p>
+
+<pre caption="My caption">
+a <i>command</i>
+ verbatim
+text
+toto <comment>tata tutu</comment>.
+titi
+</pre>
+
+</body>
+</section>
+</chapter>
+
+</guide>
diff --git a/t/fmt/xml/cdata.norm b/t/fmt/xml/cdata.norm
new file mode 100644
index 0000000..58f3fb8
--- /dev/null
+++ b/t/fmt/xml/cdata.norm
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding="UTF-8"?>
+<doc>
+ <foo>brackets ]] inside a tag </foo>
+ <![CDATA[Example on a single line]]>
+ <![CDATA[
+Example on
+multiple lines
+]]>
+</doc>
diff --git a/t/fmt/xml/cdata.po b/t/fmt/xml/cdata.po
new file mode 100644
index 0000000..276e5a0
--- /dev/null
+++ b/t/fmt/xml/cdata.po
@@ -0,0 +1,39 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2010-11-03 22:18+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. type: Content of: <doc><foo>
+#: cdata.xml:3
+#, no-wrap
+msgid "brackets ]] inside a tag "
+msgstr "BRACKETS ]] INSIDE A TAG "
+
+#. type: CDATA
+#: cdata.xml:4
+#, no-wrap
+msgid "Example on a single line"
+msgstr "EXAMPLE ON A SINGLE LINE"
+
+#. type: CDATA
+#: cdata.xml:5
+#, no-wrap
+msgid ""
+"Example on\n"
+"multiple lines\n"
+msgstr ""
+"EXAMPLE ON\n"
+"MULTIPLE LINES\n"
diff --git a/t/fmt/xml/cdata.pot b/t/fmt/xml/cdata.pot
new file mode 100644
index 0000000..a1ac962
--- /dev/null
+++ b/t/fmt/xml/cdata.pot
@@ -0,0 +1,37 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2010-11-03 22:18+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. type: Content of: <doc><foo>
+#: cdata.xml:3
+#, no-wrap
+msgid "brackets ]] inside a tag "
+msgstr ""
+
+#. type: CDATA
+#: cdata.xml:4
+#, no-wrap
+msgid "Example on a single line"
+msgstr ""
+
+#. type: CDATA
+#: cdata.xml:5
+#, no-wrap
+msgid ""
+"Example on\n"
+"multiple lines\n"
+msgstr ""
diff --git a/t/fmt/xml/cdata.trans b/t/fmt/xml/cdata.trans
new file mode 100644
index 0000000..b827144
--- /dev/null
+++ b/t/fmt/xml/cdata.trans
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding="UTF-8"?>
+<doc>
+ <foo>BRACKETS ]] INSIDE A TAG </foo>
+ <![CDATA[EXAMPLE ON A SINGLE LINE]]>
+ <![CDATA[
+EXAMPLE ON
+MULTIPLE LINES
+]]>
+</doc>
diff --git a/t/fmt/xml/cdata.xml b/t/fmt/xml/cdata.xml
new file mode 100644
index 0000000..58f3fb8
--- /dev/null
+++ b/t/fmt/xml/cdata.xml
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding="UTF-8"?>
+<doc>
+ <foo>brackets ]] inside a tag </foo>
+ <![CDATA[Example on a single line]]>
+ <![CDATA[
+Example on
+multiple lines
+]]>
+</doc>
diff --git a/t/fmt/xml/comments.norm b/t/fmt/xml/comments.norm
new file mode 100644
index 0000000..7388505
--- /dev/null
+++ b/t/fmt/xml/comments.norm
@@ -0,0 +1,21 @@
+<?xml version='1.0' encoding="UTF-8"?>
+ <p>
+
+
+ <!-- first comment -->
+<!-- second comment
+ multiline -->
+<!-- comment inside the paragraph -->
+<!-- comment after the paragraph -->
+paragraph foo bar bar qux
+
+ </p>
+
+<pre>
+<!-- comment pre -->
+a command
+
+verbatim
+text
+</pre>
+
diff --git a/t/fmt/xml/comments.po b/t/fmt/xml/comments.po
new file mode 100644
index 0000000..d5e82e0
--- /dev/null
+++ b/t/fmt/xml/comments.po
@@ -0,0 +1,42 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2008-02-29 22:20+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. first comment
+#. second comment
+#. multiline
+#. comment inside the paragraph
+#. comment after the paragraph
+#. type: Content of: <p>
+#: comments.xml:6
+msgid "paragraph foo bar bar qux"
+msgstr "PARAGRAPH FOO BAR BAR QUX"
+
+#. comment pre
+#. type: Content of: <pre>
+#: comments.xml:14
+#, no-wrap
+msgid ""
+"a command\n"
+" \n"
+"verbatim\n"
+"text\n"
+msgstr ""
+"A COMMAND\n"
+" \n"
+"VERBATIM\n"
+"TEXT\n"
diff --git a/t/fmt/xml/comments.pot b/t/fmt/xml/comments.pot
new file mode 100644
index 0000000..cde411a
--- /dev/null
+++ b/t/fmt/xml/comments.pot
@@ -0,0 +1,38 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2008-02-29 22:20+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. first comment
+#. second comment
+#. multiline
+#. comment inside the paragraph
+#. comment after the paragraph
+#. type: Content of: <p>
+#: comments.xml:6
+msgid "paragraph foo bar bar qux"
+msgstr ""
+
+#. comment pre
+#. type: Content of: <pre>
+#: comments.xml:14
+#, no-wrap
+msgid ""
+"a command\n"
+" \n"
+"verbatim\n"
+"text\n"
+msgstr ""
diff --git a/t/fmt/xml/comments.trans b/t/fmt/xml/comments.trans
new file mode 100644
index 0000000..89440b6
--- /dev/null
+++ b/t/fmt/xml/comments.trans
@@ -0,0 +1,21 @@
+<?xml version='1.0' encoding="UTF-8"?>
+ <p>
+
+
+ <!-- first comment -->
+<!-- second comment
+ multiline -->
+<!-- comment inside the paragraph -->
+<!-- comment after the paragraph -->
+PARAGRAPH FOO BAR BAR QUX
+
+ </p>
+
+<pre>
+<!-- comment pre -->
+A COMMAND
+
+VERBATIM
+TEXT
+</pre>
+
diff --git a/t/fmt/xml/comments.xml b/t/fmt/xml/comments.xml
new file mode 100644
index 0000000..c5dc7b4
--- /dev/null
+++ b/t/fmt/xml/comments.xml
@@ -0,0 +1,19 @@
+<?xml version='1.0' encoding="UTF-8"?>
+ <p>
+ <!-- first comment -->
+ <!-- second comment
+ multiline -->
+ paragraph foo
+ bar
+ <!-- comment inside the paragraph -->
+ bar qux
+ <!-- comment after the paragraph -->
+ </p>
+
+<pre>
+a command
+ <!-- comment pre -->
+verbatim
+text
+</pre>
+
diff --git a/t/fmt/xml/inside-foldattribute.norm b/t/fmt/xml/inside-foldattribute.norm
new file mode 100644
index 0000000..312f4b5
--- /dev/null
+++ b/t/fmt/xml/inside-foldattribute.norm
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+ <p>
+ Here I put an image.
+ <image src="path/to/image.png" alt="This information is important for blind users." />
+ If the image is not shown, please see the alternative text.
+ </p>
+</doc>
diff --git a/t/fmt/xml/inside-foldattribute.po b/t/fmt/xml/inside-foldattribute.po
new file mode 100644
index 0000000..668d2a4
--- /dev/null
+++ b/t/fmt/xml/inside-foldattribute.po
@@ -0,0 +1,35 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2022-12-27 15:50+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. type: Attribute 'alt' of: <doc><p><image>
+msgid "This information is important for blind users."
+msgstr "tHIS INFORMATION IS IMPORTANT FOR BLIND USERS."
+
+#. type: Content of: <doc><p>
+#: inside-foldattribute.xml:4
+#, no-wrap
+msgid ""
+" Here I put an image.\n"
+" <image po4a-id=0>\n"
+" If the image is not shown, please see the alternative text.\n"
+" "
+msgstr ""
+" hERE i PUT AN IMAGE.\n"
+" <image po4a-id=0>\n"
+" iF THE IMAGE IS NOT SHOWN, PLEASE SEE THE ALTERNATIVE TEXT.\n"
+" "
diff --git a/t/fmt/xml/inside-foldattribute.pot b/t/fmt/xml/inside-foldattribute.pot
new file mode 100644
index 0000000..a2eb8da
--- /dev/null
+++ b/t/fmt/xml/inside-foldattribute.pot
@@ -0,0 +1,31 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2022-12-27 15:50+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. type: Attribute 'alt' of: <doc><p><image>
+msgid "This information is important for blind users."
+msgstr ""
+
+#. type: Content of: <doc><p>
+#: inside-foldattribute.xml:4
+#, no-wrap
+msgid ""
+" Here I put an image.\n"
+" <image po4a-id=0>\n"
+" If the image is not shown, please see the alternative text.\n"
+" "
+msgstr ""
diff --git a/t/fmt/xml/inside-foldattribute.trans b/t/fmt/xml/inside-foldattribute.trans
new file mode 100644
index 0000000..c32ce45
--- /dev/null
+++ b/t/fmt/xml/inside-foldattribute.trans
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+ <p>
+ hERE i PUT AN IMAGE.
+ <image src="path/to/image.png" alt="tHIS INFORMATION IS IMPORTANT FOR BLIND USERS." />
+ iF THE IMAGE IS NOT SHOWN, PLEASE SEE THE ALTERNATIVE TEXT.
+ </p>
+</doc>
diff --git a/t/fmt/xml/inside-foldattribute.xml b/t/fmt/xml/inside-foldattribute.xml
new file mode 100644
index 0000000..f330c0b
--- /dev/null
+++ b/t/fmt/xml/inside-foldattribute.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<doc>
+ <p>
+ Here I put an image.
+ <image src="path/to/image.png" alt="This information is important for blind users." />
+ If the image is not shown, please see the alternative text.
+ </p>
+</doc>
diff --git a/t/fmt/xml/options.desc b/t/fmt/xml/options.desc
new file mode 100644
index 0000000..6e06af9
--- /dev/null
+++ b/t/fmt/xml/options.desc
@@ -0,0 +1 @@
+-o translated='w<translate1w> W<translate2W> <translate5> i<inline6> ' -o untranslated='<untranslated4>'
diff --git a/t/fmt/xml/options.norm b/t/fmt/xml/options.norm
new file mode 100644
index 0000000..1f601bc
--- /dev/null
+++ b/t/fmt/xml/options.norm
@@ -0,0 +1,31 @@
+<?xml version='1.0' encoding="UTF-8"?>
+ <translate1w>
+ foo bar translate1w
+ </translate1w>
+ <translate2W>
+ foo bar translate2W
+ </translate2W>
+ <default3>
+ foo bar default3
+ </default3>
+ <untranslated4>
+ foo bar untranslated4
+ </untranslated4>
+ <untranslated4>
+ foo bar untranslated4
+ <translate5>
+ foo bar translate5
+ </translate5>
+ </untranslated4>
+ <translate2W>
+ foo bar translate2W <inline6>foo bar inline6</inline6>
+ </translate2W>
+ <translate2W>
+ <inline6>foo bar inline6</inline6>
+ </translate2W>
+ <translate1w>
+ foo bar translate1w <inline6>foo bar inline6</inline6>
+ </translate1w>
+ <translate1w>
+ <inline6>foo bar inline6</inline6>
+ </translate1w>
diff --git a/t/fmt/xml/options.po b/t/fmt/xml/options.po
new file mode 100644
index 0000000..667a0bc
--- /dev/null
+++ b/t/fmt/xml/options.po
@@ -0,0 +1,82 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2008-03-02 14:56+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. type: Content of: <translate1w>
+#: options.xml:3
+msgid "foo bar translate1w"
+msgstr "FOO BAR TRANSLATE1W"
+
+#. type: Content of: <translate2W>
+#: options.xml:6
+#, no-wrap
+msgid ""
+" foo bar translate2W\n"
+" "
+msgstr ""
+" FOO BAR TRANSLATE2W\n"
+" "
+
+#. type: Content of: <default3>
+#: options.xml:9
+#, no-wrap
+msgid ""
+" foo bar default3\n"
+" "
+msgstr ""
+" FOO BAR DEFAULT3\n"
+" "
+
+#. type: Content of: <untranslated4><translate5>
+#: options.xml:17
+#, no-wrap
+msgid ""
+" foo bar translate5\n"
+" "
+msgstr ""
+" FOO BAR TRANSLATE5\n"
+" "
+
+#. type: Content of: <translate2W>
+#: options.xml:21
+#, no-wrap
+msgid ""
+" foo bar translate2W <inline6>foo bar inline6</inline6>\n"
+" "
+msgstr ""
+" FOO BAR TRANSLATE2W <inline6>FOO BAR INLINE6</inline6>\n"
+" "
+
+#. type: Content of: <translate2W>
+#: options.xml:24
+#, no-wrap
+msgid ""
+" <inline6>foo bar inline6</inline6>\n"
+" "
+msgstr ""
+" <inline6>FOO BAR INLINE6</inline6>\n"
+" "
+
+#. type: Content of: <translate1w>
+#: options.xml:27
+msgid "foo bar translate1w <inline6>foo bar inline6</inline6>"
+msgstr "FOO BAR TRANSLATE1W <inline6>FOO BAR INLINE6</inline6>"
+
+#. type: Content of: <translate1w>
+#: options.xml:30
+msgid "<inline6>foo bar inline6</inline6>"
+msgstr "<inline6>FOO BAR INLINE6</inline6>"
diff --git a/t/fmt/xml/options.pot b/t/fmt/xml/options.pot
new file mode 100644
index 0000000..61399de
--- /dev/null
+++ b/t/fmt/xml/options.pot
@@ -0,0 +1,72 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2008-03-02 14:56+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. type: Content of: <translate1w>
+#: options.xml:3
+msgid "foo bar translate1w"
+msgstr ""
+
+#. type: Content of: <translate2W>
+#: options.xml:6
+#, no-wrap
+msgid ""
+" foo bar translate2W\n"
+" "
+msgstr ""
+
+#. type: Content of: <default3>
+#: options.xml:9
+#, no-wrap
+msgid ""
+" foo bar default3\n"
+" "
+msgstr ""
+
+#. type: Content of: <untranslated4><translate5>
+#: options.xml:17
+#, no-wrap
+msgid ""
+" foo bar translate5\n"
+" "
+msgstr ""
+
+#. type: Content of: <translate2W>
+#: options.xml:21
+#, no-wrap
+msgid ""
+" foo bar translate2W <inline6>foo bar inline6</inline6>\n"
+" "
+msgstr ""
+
+#. type: Content of: <translate2W>
+#: options.xml:24
+#, no-wrap
+msgid ""
+" <inline6>foo bar inline6</inline6>\n"
+" "
+msgstr ""
+
+#. type: Content of: <translate1w>
+#: options.xml:27
+msgid "foo bar translate1w <inline6>foo bar inline6</inline6>"
+msgstr ""
+
+#. type: Content of: <translate1w>
+#: options.xml:30
+msgid "<inline6>foo bar inline6</inline6>"
+msgstr ""
diff --git a/t/fmt/xml/options.trans b/t/fmt/xml/options.trans
new file mode 100644
index 0000000..f5e368a
--- /dev/null
+++ b/t/fmt/xml/options.trans
@@ -0,0 +1,31 @@
+<?xml version='1.0' encoding="UTF-8"?>
+ <translate1w>
+ FOO BAR TRANSLATE1W
+ </translate1w>
+ <translate2W>
+ FOO BAR TRANSLATE2W
+ </translate2W>
+ <default3>
+ FOO BAR DEFAULT3
+ </default3>
+ <untranslated4>
+ foo bar untranslated4
+ </untranslated4>
+ <untranslated4>
+ foo bar untranslated4
+ <translate5>
+ FOO BAR TRANSLATE5
+ </translate5>
+ </untranslated4>
+ <translate2W>
+ FOO BAR TRANSLATE2W <inline6>FOO BAR INLINE6</inline6>
+ </translate2W>
+ <translate2W>
+ <inline6>FOO BAR INLINE6</inline6>
+ </translate2W>
+ <translate1w>
+ FOO BAR TRANSLATE1W <inline6>FOO BAR INLINE6</inline6>
+ </translate1w>
+ <translate1w>
+ <inline6>FOO BAR INLINE6</inline6>
+ </translate1w>
diff --git a/t/fmt/xml/options.xml b/t/fmt/xml/options.xml
new file mode 100644
index 0000000..1f601bc
--- /dev/null
+++ b/t/fmt/xml/options.xml
@@ -0,0 +1,31 @@
+<?xml version='1.0' encoding="UTF-8"?>
+ <translate1w>
+ foo bar translate1w
+ </translate1w>
+ <translate2W>
+ foo bar translate2W
+ </translate2W>
+ <default3>
+ foo bar default3
+ </default3>
+ <untranslated4>
+ foo bar untranslated4
+ </untranslated4>
+ <untranslated4>
+ foo bar untranslated4
+ <translate5>
+ foo bar translate5
+ </translate5>
+ </untranslated4>
+ <translate2W>
+ foo bar translate2W <inline6>foo bar inline6</inline6>
+ </translate2W>
+ <translate2W>
+ <inline6>foo bar inline6</inline6>
+ </translate2W>
+ <translate1w>
+ foo bar translate1w <inline6>foo bar inline6</inline6>
+ </translate1w>
+ <translate1w>
+ <inline6>foo bar inline6</inline6>
+ </translate1w>
diff --git a/t/fmt/xml/placeholder-empty.norm b/t/fmt/xml/placeholder-empty.norm
new file mode 100644
index 0000000..38602df
--- /dev/null
+++ b/t/fmt/xml/placeholder-empty.norm
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+ <p>
+ A <place attr="value1"/> B <place attr="value2"/> C <place attr="value3">and</place> D.
+ </p>
+</doc>
diff --git a/t/fmt/xml/placeholder-empty.po b/t/fmt/xml/placeholder-empty.po
new file mode 100644
index 0000000..995b599
--- /dev/null
+++ b/t/fmt/xml/placeholder-empty.po
@@ -0,0 +1,35 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2022-12-27 15:42+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. type: Content of: <doc><p><place>
+#: placeholder-empty.xml:4
+#, no-wrap
+msgid "and"
+msgstr "AND"
+
+#. type: Content of: <doc><p>
+#: placeholder-empty.xml:4
+#, no-wrap
+msgid ""
+" A <placeholder type=\"place\" id=\"0\"/> B <placeholder type=\"place\" "
+"id=\"1\"/> C <placeholder type=\"place\" id=\"2\"/> D.\n"
+" "
+msgstr ""
+" a <placeholder type=\"place\" id=\"0\"/> b <placeholder type=\"place\" "
+"id=\"1\"/> c <placeholder type=\"place\" id=\"2\"/> d.\n"
+" "
diff --git a/t/fmt/xml/placeholder-empty.pot b/t/fmt/xml/placeholder-empty.pot
new file mode 100644
index 0000000..fb2ad20
--- /dev/null
+++ b/t/fmt/xml/placeholder-empty.pot
@@ -0,0 +1,32 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2022-12-27 15:42+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. type: Content of: <doc><p><place>
+#: placeholder-empty.xml:4
+#, no-wrap
+msgid "and"
+msgstr ""
+
+#. type: Content of: <doc><p>
+#: placeholder-empty.xml:4
+#, no-wrap
+msgid ""
+" A <placeholder type=\"place\" id=\"0\"/> B <placeholder type=\"place\" "
+"id=\"1\"/> C <placeholder type=\"place\" id=\"2\"/> D.\n"
+" "
+msgstr ""
diff --git a/t/fmt/xml/placeholder-empty.trans b/t/fmt/xml/placeholder-empty.trans
new file mode 100644
index 0000000..9999393
--- /dev/null
+++ b/t/fmt/xml/placeholder-empty.trans
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+ <p>
+ a <place attr="value1"/> b <place attr="value2"/> c <place attr="value3">AND</place> d.
+ </p>
+</doc>
diff --git a/t/fmt/xml/placeholder-empty.xml b/t/fmt/xml/placeholder-empty.xml
new file mode 100644
index 0000000..b8780fd
--- /dev/null
+++ b/t/fmt/xml/placeholder-empty.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<doc>
+ <p>
+ A <place attr="value1"/> B <place attr="value2"/> C <place attr="value3">and</place> D.
+ </p>
+</doc>