gnucash-docs maint: Multiple changes pushed

Frank H.Ellenberger fell at code.gnucash.org
Thu Apr 22 14:47:22 EDT 2021


Updated	 via  https://github.com/Gnucash/gnucash-docs/commit/1afa671a (commit)
	 via  https://github.com/Gnucash/gnucash-docs/commit/9f076edc (commit)
	 via  https://github.com/Gnucash/gnucash-docs/commit/dd404a71 (commit)
	 via  https://github.com/Gnucash/gnucash-docs/commit/4b746b75 (commit)
	from  https://github.com/Gnucash/gnucash-docs/commit/cb180053 (commit)



commit 1afa671aaa56a5b997adefa0ff85ec14abf052f1
Author: Frank H. Ellenberger <frank.h.ellenberger at gmail.com>
Date:   Tue Apr 20 20:11:27 2021 +0200

    Several fixes of shortcuts in C and pt

diff --git a/help/C/Help_ch_Account-Actions.xml b/help/C/Help_ch_Account-Actions.xml
index dd6871b..293d447 100644
--- a/help/C/Help_ch_Account-Actions.xml
+++ b/help/C/Help_ch_Account-Actions.xml
@@ -646,10 +646,11 @@
        <title>Editing an Account</title>
         <para>The <guilabel>Edit Account</guilabel> dialog consists of just the <guilabel>General</guilabel> tab. This tab
         has the same information that was described in <xref linkend="acct-create"></xref>.
-        To access the <guilabel>Edit Account</guilabel> dialog go to <menuchoice><guimenu>Edit</guimenu>
-        <guimenuitem>Edit Account</guimenuitem></menuchoice>
-        (menu shortcut <keycombo><keycap>Ctrl</keycap><keycap>E</keycap></keycombo>) or
-        click the <guibutton>Edit</guibutton> <emphasis>Toolbar</emphasis> icon in the Account Tree Window.</para>
+        To access the <guilabel>Edit Account</guilabel> dialog go to <menuchoice>
+        <shortcut><keycombo><keycap>Ctrl</keycap><keycap>E</keycap></keycombo></shortcut>
+        <guimenu>Edit</guimenu><guimenuitem>Edit Account</guimenuitem>
+        </menuchoice>
+        or click the <guibutton>Edit</guibutton> <emphasis>Toolbar</emphasis> icon in the Account Tree Window.</para>
       </sect1>
 
       <sect1 id="chart-renumber">
@@ -840,8 +841,8 @@
 
       <tip>
         <para>The Reconcile window is accessed from the account tree window or the account register window by
-        going to <menuchoice><guimenu>Actions</guimenu><guimenuitem>Reconcile...</guimenuitem></menuchoice>
-        or using the menu shortcut <keycombo><keycap>Alt</keycap><keycap>A</keycap></keycombo>, <keycap>R</keycap>.</para>
+        selecting <menuchoice><guimenu><accel>A</accel>ctions</guimenu><guimenuitem><accel>R</accel>econcile…</guimenuitem>
+        </menuchoice>.</para>
       </tip>
 
         <para>The <emphasis>Summary Bar</emphasis> at the bottom of the Account Register Window indicates the amounts
@@ -1060,10 +1061,13 @@
 	  <para>By pressing the <guilabel>Open</guilabel> icon the register of the account to reconcile will be opened.</para>
 
 	  <para>If you wish to postpone the reconciliation until later use the
-          <menuchoice><guimenu>Reconcile</guimenu><guimenuitem>Postpone</guimenuitem></menuchoice>
-          menu item (menu shortcut <keycombo><keycap>Ctrl</keycap><keycap>P</keycap></keycombo>) or pressing the
+          <menuchoice>
+          <shortcut><keycombo><keycap>Ctrl</keycap><keycap>P</keycap></keycombo></shortcut>
+          <guimenu><accel>R</accel>econcile</guimenu><guimenuitem>Postpone</guimenuitem>
+          </menuchoice>
+          menu item or pressing the
           <guibutton>Postpone</guibutton> icon. If you wish to cancel the reconciliation use the
-          <menuchoice><guimenu>Reconcile</guimenu><guimenuitem>Cancel</guimenuitem></menuchoice> menu item or press the
+          <menuchoice><guimenu><accel>R</accel>econcile</guimenu><guimenuitem>Cancel</guimenuitem></menuchoice> menu item or press the
           <guibutton>Cancel</guibutton> icon.</para>
 
 	  <para>All previous commands are also available in the <guilabel>Reconcile</guilabel> dialog menu.</para>
@@ -1072,9 +1076,11 @@
           green tick appears in the <guilabel>R</guilabel> column. The <guilabel>Balance</guilabel> pane changes to reflect each
           selected transaction until the <guilabel>Ending Balance</guilabel> <emphasis>equals</emphasis>
           the <guilabel>Reconciled Balance</guilabel> and the <guilabel>Difference</guilabel> is <emphasis>zero</emphasis>.
-          Once this is done select the <guibutton>Finish</guibutton> button or
-          <menuchoice><guimenu>Reconcile</guimenu><guimenuitem>Finish</guimenuitem></menuchoice>
-          (menu shortcut <keycombo><keycap>Ctrl</keycap><keycap>F</keycap></keycombo>) to finish the reconcile process.</para>
+          Once this is done select the <guibutton>Finish</guibutton> button or <menuchoice>
+          <shortcut><keycombo><keycap>Ctrl</keycap><keycap>W</keycap></keycombo></shortcut>
+          <guimenu><accel>R</accel>econcile</guimenu><guimenuitem>Finish</guimenuitem>
+          </menuchoice>
+          to finish the reconcile process.</para>
         </sect2>
 
    </sect1>
diff --git a/help/C/Help_ch_Tools_Assistants.xml b/help/C/Help_ch_Tools_Assistants.xml
index c5174ff..85a980b 100644
--- a/help/C/Help_ch_Tools_Assistants.xml
+++ b/help/C/Help_ch_Tools_Assistants.xml
@@ -37,7 +37,7 @@
       <title>Find Transaction</title>
         <para><guilabel>Find Transaction</guilabel> is used to search for transactions in &app;
         and display the results in a register window. To open the <guilabel>Find Transaction</guilabel> dialog in
-        <guilabel>Split Search</guilabel> mode, you can type the keyboard shortcut <keycombo><keycap>Ctrl</keycap><keycap>f</keycap></keycombo>.</para>
+        <guilabel>Split Search</guilabel> mode, you can type the keyboard shortcut <keycombo><keycap>Ctrl</keycap><keycap>F</keycap></keycombo>.</para>
 
         <para>Exactly which transactions are searched depends on
         where you invoke the tool from. If you start from the main
diff --git a/help/C/Help_ch_Transactions.xml b/help/C/Help_ch_Transactions.xml
index 6937d54..d2cd18f 100644
--- a/help/C/Help_ch_Transactions.xml
+++ b/help/C/Help_ch_Transactions.xml
@@ -62,9 +62,9 @@ Author:
   <sect1 id="trans-win-enter">
     <title>Transfer Funds Dialog Box</title>
     <para>The <guilabel>Transfer Funds Dialog Box</guilabel>, accessed
-    via <menuchoice><guimenu>Actions</guimenu>
-    <guimenuitem>Transfer...</guimenuitem></menuchoice> or its
-    shortcut or by pressing the <guibutton>Transfer</guibutton> icon
+    via <menuchoice><guimenu><accel>A</accel>ctions</guimenu>
+    <guimenuitem><accel>T</accel>ransfer...</guimenuitem></menuchoice>
+    or by pressing the <guibutton>Transfer</guibutton> icon
     from the account register tab, serves two purposes in
     <application>&appname;</application>: <itemizedlist><listitem><para>A way to
     create a simple (i.e. two-split) transaction between arbitrary
diff --git a/help/pt/Help_ch_Account-Actions.xml b/help/pt/Help_ch_Account-Actions.xml
index 9f3aba1..b4b265c 100644
--- a/help/pt/Help_ch_Account-Actions.xml
+++ b/help/pt/Help_ch_Account-Actions.xml
@@ -706,9 +706,11 @@
        <title>Editar uma conta</title>
         <para>O diálogo <guilabel>Editar conta</guilabel> consiste só no separador <guilabel>Geral</guilabel>. 
         Este tem a mesma informação descrita em <xref linkend="acct-create"></xref>.
-        Para aceder ao diálogo <guilabel>Editar conta</guilabel> vá a <menuchoice><guimenu>Editar</guimenu>
-        <guimenuitem>Editar conta</guimenuitem></menuchoice> 
-        (atalho <keycombo><keycap>Ctrl</keycap><keycap>E</keycap></keycombo>) ou clique em 
+        Para aceder ao diálogo <guilabel>Editar conta</guilabel> vá a <menuchoice>
+        <shortcut><keycombo><keycap>Ctrl</keycap><keycap>E</keycap></keycombo></shortcut>
+        <guimenu><accel>E</accel>ditar</guimenu><guimenuitem>Editar <accel>c</accel>onta</guimenuitem>
+        </menuchoice> 
+        ou clique em 
         <guibutton>Editar</guibutton> na <emphasis>barra de ferramentas</emphasis> da árvore de contas. 
         Também pode clicar numa conta com o botão direito do rato e escolher <guilabel>Editar conta</guilabel>.</para>
       </sect1>
@@ -900,8 +902,7 @@
 
       <tip>
         <para>A janela de reconciliação é acedida nas janelas da árvore de contas ou do diário de conta, 
-        indo a <menuchoice><guimenu>Acções</guimenu><guimenuitem>Reconciliar...</guimenuitem></menuchoice> 
-        ou com o atalho <keycombo><keycap>Alt</keycap><keycap>A</keycap></keycombo>, <keycap>R</keycap>.
+        indo a <menuchoice><guimenu><accel>A</accel>cções</guimenu><guimenuitem><accel>R</accel>Rconciliar...</guimenuitem></menuchoice>.
         Também pode clicar numa conta com o botão direito do rato e escolher <guilabel>Reconciliar...</guilabel>.</para>
       </tip>
 
@@ -1112,10 +1113,12 @@
 
 	  <para>Se clicar no ícone <guilabel>Abrir</guilabel>, abre o diário da conta a reconciliar.</para>
           
-	  <para>Se quiser adiar a reconciliação escolha <menuchoice><guimenu>Reconciliar</guimenu>
-	  <guimenuitem>Adiar</guimenuitem></menuchoice> (atalho <keycombo><keycap>Ctrl</keycap><keycap>P</keycap></keycombo>) 
+	  <para>Se quiser adiar a reconciliação escolha <menuchoice>
+    <shortcut><keycombo><keycap>Ctrl</keycap><keycap>W</keycap></keycombo></shortcut>
+    <guimenu><accel>R</accel>econciliar</guimenu><guimenuitem><accel>A</accel>diar</guimenuitem>
+    </menuchoice>
 	  ou clique no ícone <guibutton>Adiar</guibutton>. Se quiser cancelar a reconciliação, escolha 
-          <menuchoice><guimenu>Reconciliar</guimenu><guimenuitem>Cancelar</guimenuitem></menuchoice> ou clique no 
+          <menuchoice><guimenu><accel>R</accel>econciliar</guimenu><guimenuitem><accel>C</accel>ancelar</guimenuitem></menuchoice>
           ícone <guibutton>Cancelar</guibutton>.</para>
 
 	  <para>Todos os comandos acima estão também disponíveis no menu <guilabel>Reconciliar</guilabel>.</para>
@@ -1126,8 +1129,10 @@
           seja <emphasis>igual</emphasis> ao <guilabel>Saldo reconciliado</guilabel> e a 
           <guilabel>Diferença</guilabel> seja <emphasis>zero</emphasis>. 
           Uma vez isto feito, clique em <guibutton>Terminar</guibutton> ou vá a 
-          <menuchoice><guimenu>Reconciliar</guimenu><guimenuitem>Terminar</guimenuitem></menuchoice> 
-          (atalho <keycombo><keycap>Ctrl</keycap><keycap>F</keycap></keycombo>) para terminar o processo.</para>
+          <menuchoice>
+          <shortcut><keycombo><keycap>Ctrl</keycap><keycap>F</keycap></keycombo></shortcut>
+          <guimenu><accel>R</accel>econciliar</guimenu><guimenuitem><accel>T</accel>erminar</guimenuitem></menuchoice>
+          para terminar o processo.</para>
         </sect2>
 
    </sect1>
diff --git a/help/pt/Help_ch_Tools_Assistants.xml b/help/pt/Help_ch_Tools_Assistants.xml
index 837729b..aa526fd 100644
--- a/help/pt/Help_ch_Tools_Assistants.xml
+++ b/help/pt/Help_ch_Tools_Assistants.xml
@@ -37,7 +37,7 @@
         <para>O diálogo <guilabel>Procurar transacção</guilabel> é usado para procurar transacções no
         &app; e mostrar os resultados numa janela de diário. Para abrir o
         diálogo <guilabel>Procurar transacção</guilabel>, em modo de <guilabel>Procurar parcelas</guilabel>,
-        pode digitar o atalho de teclado <keycombo><keycap>Ctrl</keycap><keycap>f</keycap></keycombo>.</para>
+        pode digitar o atalho de teclado <keycombo><keycap>Ctrl</keycap><keycap>F</keycap></keycombo>.</para>
 
         <para>Quais são exactamente as transacções a procurar depende de onde foi chamada a ferramenta.
         Se começar na página principal de hierarquia de contas, a procura é feita em todas as transacções.

commit 9f076edcecc04cb83717801ed1bddd9c528b9e31
Author: Frank H. Ellenberger <frank.h.ellenberger at gmail.com>
Date:   Tue Apr 20 17:53:54 2021 +0200

    Minor improvement of adress & email tags

diff --git a/guide/de/gnucash-guide.xml b/guide/de/gnucash-guide.xml
index 1397a8f..afefa83 100644
--- a/guide/de/gnucash-guide.xml
+++ b/guide/de/gnucash-guide.xml
@@ -90,9 +90,7 @@
  
     <publisher>
        <publishername>&appname; Documentation Team</publishername>
-       <address>
-         <email>gnucash-devel at gnucash.org</email>
-       </address>
+       <address><email>gnucash-devel at gnucash.org</email></address>
     </publisher>
 
 <!--
@@ -537,7 +535,7 @@
       <surname>Translator 1</surname>
       <affiliation>
         <orgname>Latin Translation Team</orgname>
-        <address> <email>translator at gnome.org</email> </address>
+        <address><email>translator at gnome.org</email></address>
       </affiliation>
       <contrib>Latin translation</contrib>
       <email>email at address.com</email>
diff --git a/guide/it/gnucash-guide.xml b/guide/it/gnucash-guide.xml
index da47d88..4d95d1f 100644
--- a/guide/it/gnucash-guide.xml
+++ b/guide/it/gnucash-guide.xml
@@ -75,9 +75,7 @@
 
     <publisher>
        <publishername>The GnuCash Documentation Team</publishername>
-       <address>
-         <email>gnucash-devel at gnucash.org</email>
-       </address>
+       <address><email>gnucash-devel at gnucash.org</email></address>
     </publisher>
 
       <legalnotice id="legalnotice">
diff --git a/guide/ja/gnucash-guide.xml b/guide/ja/gnucash-guide.xml
index 94dff72..b8bc15e 100644
--- a/guide/ja/gnucash-guide.xml
+++ b/guide/ja/gnucash-guide.xml
@@ -54,9 +54,7 @@
 <copyright> <year>2001</year> <holder>Carol Champagne and Chris
 Lyttle</holder> </copyright>
 <publisher><publishername>&appname;文書化チーム</publishername>
-       <address>
-         <email>gnucash-user at gnucash.org</email>
-       </address>
+       <address><email>gnucash-user at gnucash.org</email></address>
 </publisher>
 
 <xi:include href="legal.xml" />
@@ -318,7 +316,7 @@ Lyttle</holder> </copyright>
 	 <firstname>Yasuaki</firstname> <surname>Taniguchi</surname>
         <affiliation>
           <orgname>日本語翻訳チーム</orgname>
-          <address> <email>translation-team-ja at lists.sourceforge.net</email> </address>
+          <address><email>translation-team-ja at lists.sourceforge.net</email></address>
         </affiliation>
         <contrib>日本語訳</contrib>
       </othercredit>
@@ -336,7 +334,7 @@ Lyttle</holder> </copyright>
         <surname>Translator 1</surname>
         <affiliation>
           <orgname>Latin Translation Team</orgname>
-          <address> <email>translator at gnome.org</email> </address>
+          <address><email>translator at gnome.org</email></address>
         </affiliation>
         <contrib>Latin translation</contrib>
         <email>email at address.com</email>
diff --git a/guide/pt/gnucash-guide.xml b/guide/pt/gnucash-guide.xml
index ee1c382..0115cfc 100644
--- a/guide/pt/gnucash-guide.xml
+++ b/guide/pt/gnucash-guide.xml
@@ -76,9 +76,7 @@
 
     <publisher>
        <publishername>Equipa de documentação do &appname;</publishername>
-       <address>
-         <email>gnucash-devel at gnucash.org</email>
-       </address>
+       <address><email>gnucash-devel at gnucash.org</email></address>
     </publisher>
 
     <xi:include href="legal.xml" />
@@ -453,7 +451,7 @@
         <surname>Translator 1</surname>
         <affiliation>
           <orgname>Latin Translation Team</orgname>
-          <address> <email>translator at gnome.org</email> </address>
+          <address><email>translator at gnome.org</email></address>
         </affiliation>
         <contrib>Latin translation</contrib>
         <email>email at address.com</email>
diff --git a/guide/ru/gnucash-guide.xml b/guide/ru/gnucash-guide.xml
index df6c7ad..bcb3118 100644
--- a/guide/ru/gnucash-guide.xml
+++ b/guide/ru/gnucash-guide.xml
@@ -87,9 +87,7 @@
 
     <publisher>
        <publishername>The &appname; Documentation Team</publishername>
-       <address>
-         <email>gnucash-devel at gnucash.org</email>
-       </address>
+       <address><email>gnucash-devel at gnucash.org</email></address>
     </publisher>
 
     <xi:include href="legal.xml" />
@@ -434,7 +432,7 @@
         <surname>Translator 1</surname>
         <affiliation>
           <orgname>Latin Translation Team</orgname>
-          <address> <email>translator at gnome.org</email> </address>
+          <address><email>translator at gnome.org</email></address>
         </affiliation>
         <contrib>Latin translation</contrib>
         <email>email at address.com</email>
diff --git a/help/C/gnucash-help.xml b/help/C/gnucash-help.xml
index ad25dc8..371be80 100644
--- a/help/C/gnucash-help.xml
+++ b/help/C/gnucash-help.xml
@@ -36,9 +36,7 @@
 
     <publisher>
        <publishername>&appname; Documentation Team</publishername>
-       <address>
-         <email>gnucash-user at gnucash.org</email>
-       </address>
+       <address><email>gnucash-user at gnucash.org</email></address>
     </publisher>
 
     <xi:include href="Help_legal.xml" />
@@ -442,7 +440,7 @@
       <surname>Translator 1</surname>
       <affiliation>
         <orgname>Latin &appname; Translation Team</orgname>
-        <address> <email>translator at gnome.org</email> </address>
+        <address><email>translator at gnome.org</email></address>
       </affiliation>
       <contrib>Latin translation</contrib>
     </othercredit>.
diff --git a/help/de/gnucash-help.xml b/help/de/gnucash-help.xml
index 8a736b8..b5182d6 100644
--- a/help/de/gnucash-help.xml
+++ b/help/de/gnucash-help.xml
@@ -53,9 +53,7 @@
 
     <publisher>
        <publishername>&appname; Documentation Team</publishername>
-       <address>
-         <email>gnucash-user at gnucash.org</email>
-       </address>
+       <address><email>gnucash-user at gnucash.org</email></address>
     </publisher>
 
     <xi:include href="Help_legal.xml" />
@@ -378,7 +376,7 @@
       <surname>Translator 1</surname>
       <affiliation>
         <orgname>Latin Translation Team</orgname>
-        <address> <email>translator at gnome.org</email> </address>
+        <address><email>translator at gnome.org</email></address>
       </affiliation>
       <contrib>Latin translation</contrib>
       <email>email at address.com</email>
diff --git a/help/pt/gnucash-help.xml b/help/pt/gnucash-help.xml
index de6300f..3b4c904 100644
--- a/help/pt/gnucash-help.xml
+++ b/help/pt/gnucash-help.xml
@@ -41,9 +41,7 @@
 
     <publisher>
        <publishername>Equipa de documentação do &appname;</publishername>
-       <address>
-         <email>gnucash-user at gnucash.org</email>
-       </address>
+       <address><email>gnucash-user at gnucash.org</email></address>
     </publisher>
 
     <xi:include href="Help_legal.xml" />
@@ -377,28 +375,25 @@
       </author>,
   <othercredit role="translator">
       <firstname>Pedro</firstname> <surname>Albuquerque</surname>
-      <affiliation>
-	   	   <address> <email>palbuquerque73 at gmail.com</email> </address>
-      </affiliation>
       <contrib>Portuguese (Portugal) translation</contrib>
+      <email>palbuquerque73 at gmail.com</email>
   </othercredit>.
 
-      <!-- This is appropriate place for other contributors: translators,
-	   maintainers,  etc. Commented out by default.
-	   <othercredit role="translator">
-	   <firstname>Latin</firstname>
-	   <surname>Translator 1</surname>
-	   <affiliation>
-	   <orgname>Latin Translation Team</orgname>
-	   <address> <email>translator at gnome.org</email> </address>
-	   </affiliation>
-	   <contrib>Latin translation</contrib>
-	   </othercredit>
-      -->
-      <!-- This is appropriate place for other contributors: translators,
-	   maintainers,  etc. Commented out by default. -->
-    </para>
-  </preface>
+  <!-- This is appropriate place for other contributors: translators,
+     maintainers,  etc. Commented out by default.
+  <othercredit role="translator">
+    <firstname>Latin</firstname>
+    <surname>Translator 1</surname>
+    <affiliation>
+      <orgname>Latin Translation Team</orgname>
+      <address><email>translator at gnome.org</email></address>
+    </affiliation>
+    <contrib>Latin translation</contrib>
+    <email></email>
+  </othercredit>
+  -->
+  </para>
+</preface>
 
 <xi:include href="Help_ch_Intro.xml" />
 <xi:include href="Help_ch_GettingHelp.xml" />

commit dd404a714c9228c56b29a0846c5f521d3cf7bd82
Author: Frank H. Ellenberger <frank.h.ellenberger at gmail.com>
Date:   Mon Apr 19 23:00:13 2021 +0200

    Check for " >" to avoid unwanted wraps

diff --git a/guide/C/ch_accts.xml b/guide/C/ch_accts.xml
index b9c151e..456bc09 100644
--- a/guide/C/ch_accts.xml
+++ b/guide/C/ch_accts.xml
@@ -49,7 +49,7 @@ Translators:
       <mediaobject>
         <imageobject role="html">
           <imagedata fileref="figures/basics_AccountRelationships.png"
-                     format="PNG" srccredit="Geert Janssens" ></imagedata>
+                     format="PNG" srccredit="Geert Janssens"></imagedata>
         </imageobject>
 
         <imageobject role="fo">
@@ -398,7 +398,7 @@ Translators:
           <mediaobject>
             <imageobject>
               <imagedata fileref="figures/accts_DefaultExpenseAccounts.png"
-                         format="PNG" srccredit="Cristian Marchi" ></imagedata>
+                         format="PNG" srccredit="Cristian Marchi"></imagedata>
             </imageobject>
 
             <textobject>
diff --git a/guide/C/ch_basics.xml b/guide/C/ch_basics.xml
index 283e358..a02c87c 100644
--- a/guide/C/ch_basics.xml
+++ b/guide/C/ch_basics.xml
@@ -127,7 +127,7 @@
           <mediaobject>
             <imageobject role="html">
               <imagedata fileref="figures/basics_AccountRelationships.png"
-                         format="PNG" srccredit="Geert Janssens" ></imagedata>
+                         format="PNG" srccredit="Geert Janssens"></imagedata>
             </imageobject>
             <imageobject role="fo">
               <imagedata fileref="figures/basics_AccountRelationships.svg"
@@ -456,7 +456,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/basics_TipOfDay.png" format="PNG"
-                       srccredit="Cristian Marchi" ></imagedata>
+                       srccredit="Cristian Marchi"></imagedata>
           </imageobject>
 
           <textobject>
@@ -490,7 +490,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/basics_Accounts.png" format="PNG"
-                       srccredit="Cristian Marchi" ></imagedata>
+                       srccredit="Cristian Marchi"></imagedata>
           </imageobject>
 
           <textobject>
@@ -550,7 +550,7 @@
 
           <imageobject role="fo">
             <imagedata fileref="figures/basics_CheckAccount.png" format="PNG"
-                       srccredit="Bengt Thuree" ></imagedata>
+                       srccredit="Bengt Thuree"></imagedata>
           </imageobject>
 
           <textobject>
@@ -747,11 +747,11 @@
 			<title id="basics-storage-comparison-tbltitle">Storage Comparison</title>
 
 			<tgroup align="left" cols="5">
-				<colspec colname="c1item" ></colspec>
-				<colspec colname="c2xml" ></colspec>
-				<colspec colname="c3sqlite" ></colspec>
-				<colspec colname="c4mysql" ></colspec>
-				<colspec colname="c5pgsql" ></colspec>
+				<colspec colname="c1item"></colspec>
+				<colspec colname="c2xml"></colspec>
+				<colspec colname="c3sqlite"></colspec>
+				<colspec colname="c4mysql"></colspec>
+				<colspec colname="c5pgsql"></colspec>
 
             <thead>
               <row>
@@ -765,9 +765,9 @@
 
             <tbody>
             <row>
-				<entry namest="c1item"                      >Availability</entry>
-  				<entry align="center" namest="c2xml"        > Built-in </entry>
-  				<entry align="center" namest="c3sqlite" nameend="c5pgsql" > Depends on packaging<footnote>
+				<entry namest="c1item">Availability</entry>
+  				<entry align="center" namest="c2xml"> Built-in </entry>
+  				<entry align="center" namest="c3sqlite" nameend="c5pgsql"> Depends on packaging<footnote>
 					<para>SQLite relies on an additional package and driver (called libdbi 
 						and libdbd-sqlite3, respectively), which are installed by 
 						default on Mac OS and Windows. Linux users may need to manually 
@@ -779,43 +779,43 @@
 			</row>
 
 			<row>
-				<entry namest="c1item"                      >File extension</entry>
-  				<entry align="center" namest="c2xml" nameend="c3sqlite"       > gnucash </entry>
-  				<entry align="center" namest="c4mysql" nameend="c5pgsql" > N/A<footnote>
+				<entry namest="c1item">File extension</entry>
+  				<entry align="center" namest="c2xml" nameend="c3sqlite"> gnucash </entry>
+  				<entry align="center" namest="c4mysql" nameend="c5pgsql"> N/A<footnote>
 					<para>MySQL and PostgreSQL place data within their own storage system.</para></footnote></entry>
 			</row>
 
 			<row>
-                <entry namest="c1item"                      >Additional software</entry>
-  				<entry align="center" namest="c2xml" nameend="c3sqlite" > None </entry>
-  				<entry align="center" namest="c4mysql"      > MySQL </entry>
-  				<entry align="center" namest="c5pgsql" > PostgreSQL </entry>
+                <entry namest="c1item">Additional software</entry>
+  				<entry align="center" namest="c2xml" nameend="c3sqlite"> None </entry>
+  				<entry align="center" namest="c4mysql"> MySQL </entry>
+  				<entry align="center" namest="c5pgsql"> PostgreSQL </entry>
 			</row>
 
 			<row>
-                <entry namest="c1item"                      >Additional expertise</entry>
-  				<entry align="center" namest="c2xml" nameend="c3sqlite"  > None </entry>
-  				<entry align="center" namest="c4mysql" nameend="c5pgsql" > Database Administrator </entry>
+                <entry namest="c1item">Additional expertise</entry>
+  				<entry align="center" namest="c2xml" nameend="c3sqlite"> None </entry>
+  				<entry align="center" namest="c4mysql" nameend="c5pgsql"> Database Administrator </entry>
 			</row>
 
 			<row>
-                <entry namest="c1item"                      >Compression</entry>
-  				<entry align="center" namest="c2xml"        > gzip </entry>
-  				<entry align="center" namest="c3sqlite" nameend="c5pgsql" > N/A </entry>
+                <entry namest="c1item">Compression</entry>
+  				<entry align="center" namest="c2xml"> gzip </entry>
+  				<entry align="center" namest="c3sqlite" nameend="c5pgsql"> N/A </entry>
 			</row>
 
 			<row>
-                <entry namest="c1item"                      >File Save</entry>
-  				<entry align="center" namest="c2xml"        > On command </entry>
-  				<entry align="center" namest="c3sqlite" nameend="c5pgsql" > On commit </entry>
+                <entry namest="c1item">File Save</entry>
+  				<entry align="center" namest="c2xml"> On command </entry>
+  				<entry align="center" namest="c3sqlite" nameend="c5pgsql"> On commit </entry>
 			</row>
 
 			<row>
-                <entry namest="c1item"                      >Multi-user</entry>
-  				<entry align="center" namest="c2xml"        > No </entry>
-  				<entry align="center" namest="c3sqlite"     > No </entry>
-  				<entry align="center" namest="c4mysql"      > No </entry>
-  				<entry align="center" namest="c5pgsql" > No </entry>
+                <entry namest="c1item">Multi-user</entry>
+  				<entry align="center" namest="c2xml"> No </entry>
+  				<entry align="center" namest="c3sqlite"> No </entry>
+  				<entry align="center" namest="c4mysql"> No </entry>
+  				<entry align="center" namest="c5pgsql"> No </entry>
 			</row>
 			</tbody>
 		</tgroup>
@@ -1319,7 +1319,7 @@
             </imageobject>
             <imageobject role="fo">
               <imagedata fileref="figures/basics_NewAccountHierarchySetup.png"
-                         format="PNG" srccredit="John Ralls" ></imagedata>
+                         format="PNG" srccredit="John Ralls"></imagedata>
             </imageobject>
             <caption>
               <para>This image shows the first screen of the <guilabel>New
@@ -1352,7 +1352,7 @@
             </imageobject>
             <imageobject role="fo">
               <imagedata fileref="figures/basics_NewBookOpts.png"
-                         format="PNG" srccredit="Frank H. Ellenberger" ></imagedata>
+                         format="PNG" srccredit="Frank H. Ellenberger"></imagedata>
             </imageobject>
             <caption>
               <para>This image shows the second screen of the <guilabel>New
@@ -1382,7 +1382,7 @@
             </imageobject>
             <imageobject role="fo">
               <imagedata fileref="figures/basics_NewAccountHierarchySetup_currency.png"
-                         format="PNG" srccredit="John Ralls" ></imagedata>
+                         format="PNG" srccredit="John Ralls"></imagedata>
             </imageobject>
             <caption>
               <para>This image shows the third screen of the <guilabel>New
@@ -1413,7 +1413,7 @@
             </imageobject>
             <imageobject role="fo">
               <imagedata fileref="figures/basics_NewAccountHierarchySetup_Accounts.png"
-                         format="PNG" srccredit="John Ralls" ></imagedata>
+                         format="PNG" srccredit="John Ralls"></imagedata>
             </imageobject>
             <caption>
               <para>This image shows the fourth screen of the <guilabel>New
@@ -1442,7 +1442,7 @@
             </imageobject>
             <imageobject role="fo">
               <imagedata fileref="figures/basics_NewAccountHierarchySetup_Setup.png"
-                         format="PNG" srccredit="John Ralls" ></imagedata>
+                         format="PNG" srccredit="John Ralls"></imagedata>
             </imageobject>
             <caption>
               <para>This image shows the fifth screen of the <guilabel>New
@@ -1468,7 +1468,7 @@
             </imageobject>
             <imageobject role="fo">
               <imagedata fileref="figures/basics_NewAccountHierarchySetup_Finish.png"
-                         format="PNG" srccredit="John Ralls" ></imagedata>
+                         format="PNG" srccredit="John Ralls"></imagedata>
             </imageobject>
             <caption>
               <para>This image shows the last screen of the <guilabel>New
@@ -1499,7 +1499,7 @@
 
               <imageobject role="fo">
                 <imagedata fileref="figures/basics_EmptyAccounts.png"
-                           format="PNG" srccredit="Frank H. Ellenberger" ></imagedata>
+                           format="PNG" srccredit="Frank H. Ellenberger"></imagedata>
               </imageobject>
             </mediaobject>
           </screenshot>
diff --git a/guide/C/ch_cc.xml b/guide/C/ch_cc.xml
index a4a55b6..472b5c9 100644
--- a/guide/C/ch_cc.xml
+++ b/guide/C/ch_cc.xml
@@ -231,7 +231,7 @@
             <mediaobject>
               <imageobject>
                 <imagedata fileref="figures/cc_Reversing_Transaction_1.png"
-                           format="PNG" srccredit="Bengt  Thuree" ></imagedata>
+                           format="PNG" srccredit="Bengt Thuree"></imagedata>
               </imageobject>
 
               <textobject>
@@ -252,7 +252,7 @@
             <mediaobject>
               <imageobject>
                 <imagedata fileref="figures/cc_Reversing_Transaction_2.png"
-                           format="PNG" srccredit="Bengt  Thuree" ></imagedata>
+                           format="PNG" srccredit="Bengt Thuree"></imagedata>
               </imageobject>
 
               <textobject>
@@ -295,7 +295,7 @@
       <mediaobject>
         <imageobject>
           <imagedata fileref="figures/cc_accounts.png" format="PNG"
-                     srccredit="Bengt Thuree" ></imagedata>
+                     srccredit="Bengt Thuree"></imagedata>
         </imageobject>
 
         <textobject>
@@ -329,7 +329,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_purchases.png" format="PNG"
-                       srccredit="Bengt Thuree" ></imagedata>
+                       srccredit="Bengt Thuree"></imagedata>
           </imageobject>
 
           <textobject>
@@ -360,7 +360,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_refund.png" format="PNG"
-                       srccredit="Bengt Thuree" ></imagedata>
+                       srccredit="Bengt Thuree"></imagedata>
           </imageobject>
 
           <textobject>
@@ -388,7 +388,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_interest.png" format="PNG"
-                       srccredit="Bengt Thuree" ></imagedata>
+                       srccredit="Bengt Thuree"></imagedata>
           </imageobject>
 
           <textobject>
@@ -421,7 +421,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_reconcile_init.png" format="PNG"
-                       srccredit="Bengt Thuree" ></imagedata>
+                       srccredit="Bengt Thuree"></imagedata>
           </imageobject>
 
           <textobject>
@@ -444,7 +444,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_reconcile.png" format="PNG"
-                       srccredit="Bengt Thuree" ></imagedata>
+                       srccredit="Bengt Thuree"></imagedata>
           </imageobject>
 
           <textobject>
@@ -480,7 +480,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_payment.png" format="PNG"
-                       srccredit="Bengt Thuree" ></imagedata>
+                       srccredit="Bengt Thuree"></imagedata>
           </imageobject>
 
           <textobject>
@@ -502,7 +502,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_final.png" format="PNG"
-                       srccredit="Bengt Thuree" ></imagedata>
+                       srccredit="Bengt Thuree"></imagedata>
           </imageobject>
 
           <textobject>
diff --git a/guide/C/ch_invest.xml b/guide/C/ch_invest.xml
index f71f3f2..899729a 100644
--- a/guide/C/ch_invest.xml
+++ b/guide/C/ch_invest.xml
@@ -1139,7 +1139,7 @@ Income
           it has already been included in the <guilabel>Buy</guilabel> value.
           The second split line will be to transfer from <emphasis>
           Assets:Bank ABC</emphasis> $5100 to balance the transaction. After the
-          splits are all correct, use the <keycap function="enter" >Enter
+          splits are all correct, use the <keycap function="enter">Enter
           </keycap> key to save the transaction. Your IBM Commodity view should
           now appear like this:
         </para>
@@ -1489,7 +1489,7 @@ Income
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_stockvalue_report_options.png"
-                       format="PNG" srccredit="John Ralls" ></imagedata>
+                       format="PNG" srccredit="John Ralls"></imagedata>
           </imageobject>
 
           <textobject>
@@ -1533,7 +1533,7 @@ Income
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_stockvalue_report.png"
-                       format="PNG" srccredit="Dave Herman" ></imagedata>
+                       format="PNG" srccredit="Dave Herman"></imagedata>
           </imageobject>
 
           <textobject>
@@ -2566,7 +2566,7 @@ Income
               </imageobject>
               <imageobject role="fo">
                 <imagedata fileref="figures/investLots2_BeforeScrub1Lot.png"
-                           format="PNG" srccredit="Chris Good" ></imagedata>
+                           format="PNG" srccredit="Chris Good"></imagedata>
               </imageobject>
 
               <textobject>
@@ -2881,7 +2881,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
                   </imageobject>
                   <imageobject role="fo">
                     <imagedata fileref="figures/investLots0_RegB4Scrub.png"
-                               format="PNG" srccredit="Chris Good" ></imagedata>
+                               format="PNG" srccredit="Chris Good"></imagedata>
                   </imageobject>
 
                   <textobject>
@@ -2924,7 +2924,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
                   </imageobject>
                   <imageobject role="fo">
                     <imagedata fileref="figures/investLots1_BeforeCreateLot.png"
-                               format="PNG" srccredit="Chris Good" ></imagedata>
+                               format="PNG" srccredit="Chris Good"></imagedata>
                   </imageobject>
 
                   <textobject>
@@ -2956,7 +2956,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
           </listitem>
 
           <listitem>
-            <para>Click the <guilabel> >> </guilabel> button to link the buy
+            <para>Click the <guilabel>>></guilabel> button to link the buy
             split with the highlighted lot. The split moves from the <guilabel>
             Splits free</guilabel> panel to the <guilabel>Splits in Lot
             </guilabel> panel.</para>
@@ -2973,7 +2973,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
           </listitem>
 
           <listitem>
-            <para>Click the <guilabel> >> </guilabel> button to link the sell
+            <para>Click the <guilabel>>></guilabel> button to link the sell
               split with the highlighted lot.</para>
           </listitem>
 
@@ -2996,7 +2996,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
                   </imageobject>
                   <imageobject role="fo">
                     <imagedata fileref="figures/investLots2_BeforeScrub1Lot.png"
-                               format="PNG" srccredit="Chris Good" ></imagedata>
+                               format="PNG" srccredit="Chris Good"></imagedata>
                   </imageobject>
 
                   <textobject>
@@ -3041,7 +3041,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
                   </imageobject>
                   <imageobject role="fo">
                     <imagedata fileref="figures/investLots2_RegAfterScrub1Lot.png"
-                               format="PNG" srccredit="Chris Good" ></imagedata>
+                               format="PNG" srccredit="Chris Good"></imagedata>
                   </imageobject>
 
                   <textobject>
@@ -3145,7 +3145,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
               </imageobject>
               <imageobject role="fo">
                 <imagedata fileref="figures/invest2Lots0RegB4Scrub.png"
-                           format="PNG" srccredit="Chris Good" ></imagedata>
+                           format="PNG" srccredit="Chris Good"></imagedata>
               </imageobject>
 
               <textobject>
@@ -3180,7 +3180,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
                   </imageobject>
                   <imageobject role="fo">
                     <imagedata fileref="figures/invest2Lots1B4Scrub.png"
-                               format="PNG" srccredit="Chris Good" ></imagedata>
+                               format="PNG" srccredit="Chris Good"></imagedata>
                   </imageobject>
 
                   <textobject>
@@ -3211,7 +3211,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
                   </imageobject>
                   <imageobject role="fo">
                     <imagedata fileref="figures/invest2Lots2LotsAftScrubAcct.png"
-                               format="PNG" srccredit="Chris Good" ></imagedata>
+                               format="PNG" srccredit="Chris Good"></imagedata>
                   </imageobject>
 
                   <textobject>
@@ -3253,7 +3253,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
                   </imageobject>
                   <imageobject role="fo">
                     <imagedata fileref="figures/invest2Lots3RegAftScrubAcct.png"
-                               format="PNG" srccredit="Chris Good" ></imagedata>
+                               format="PNG" srccredit="Chris Good"></imagedata>
                   </imageobject>
 
                   <textobject>
@@ -3307,7 +3307,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
               </imageobject>
               <imageobject role="fo">
                 <imagedata fileref="figures/investLotsSplitReg.png"
-                           format="PNG" srccredit="Chris Good" ></imagedata>
+                           format="PNG" srccredit="Chris Good"></imagedata>
               </imageobject>
 
               <textobject>
@@ -3334,7 +3334,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
               </imageobject>
               <imageobject role="fo">
                 <imagedata fileref="figures/investLotsSplitLot0.png"
-                           format="PNG" srccredit="Chris Good" ></imagedata>
+                           format="PNG" srccredit="Chris Good"></imagedata>
               </imageobject>
 
               <textobject>
@@ -3360,7 +3360,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
               </imageobject>
               <imageobject role="fo">
                 <imagedata fileref="figures/investLotsSplitLot1.png"
-                           format="PNG" srccredit="Chris Good" ></imagedata>
+                           format="PNG" srccredit="Chris Good"></imagedata>
               </imageobject>
 
               <textobject>
@@ -3427,7 +3427,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
                   </imageobject>
                   <imageobject role="fo">
                     <imagedata fileref="figures/investLots2_RegAfterScrub1Lot.png"
-                               format="PNG" srccredit="Chris Good" ></imagedata>
+                               format="PNG" srccredit="Chris Good"></imagedata>
                   </imageobject>
 
                   <textobject>
@@ -3496,7 +3496,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
           </imageobject>
           <imageobject role="fo">
             <imagedata fileref="figures/invest_dividendcash.png"
-                       format="PNG" srccredit="Daniel Dodson" ></imagedata>
+                       format="PNG" srccredit="Daniel Dodson"></imagedata>
           </imageobject>
 
           <textobject>
@@ -3654,7 +3654,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_split1.png"
-                       format="PNG" srccredit="Dave Herman" ></imagedata>
+                       format="PNG" srccredit="Dave Herman"></imagedata>
           </imageobject>
 
           <textobject>
@@ -3673,7 +3673,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_split2.png"
-                       format="PNG" srccredit="Dave Herman" ></imagedata>
+                       format="PNG" srccredit="Dave Herman"></imagedata>
           </imageobject>
 
           <textobject>
@@ -3727,7 +3727,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_split3.png"
-                       format="PNG" srccredit="Dave Herman" ></imagedata>
+                       format="PNG" srccredit="Dave Herman"></imagedata>
           </imageobject>
 
           <textobject>
@@ -3748,7 +3748,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_split4.png"
-                       format="PNG" srccredit="Dave Herman" ></imagedata>
+                       format="PNG" srccredit="Dave Herman"></imagedata>
           </imageobject>
 
           <textobject>
@@ -3768,7 +3768,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_simplesplit1.png"
-                       format="PNG" srccredit="Dave Herman" ></imagedata>
+                       format="PNG" srccredit="Dave Herman"></imagedata>
           </imageobject>
 
           <textobject>
@@ -3810,7 +3810,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_merge2.png"
-                       format="PNG" srccredit="Dave Herman" ></imagedata>
+                       format="PNG" srccredit="Dave Herman"></imagedata>
           </imageobject>
 
           <textobject>
@@ -3867,7 +3867,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_merge3.png"
-                       format="PNG" srccredit="Dave Herman" ></imagedata>
+                       format="PNG" srccredit="Dave Herman"></imagedata>
           </imageobject>
 
           <textobject>
@@ -3890,7 +3890,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_stockmerge1.png"
-                       format="PNG" srccredit="Dave Herman" ></imagedata>
+                       format="PNG" srccredit="Dave Herman"></imagedata>
           </imageobject>
 
           <textobject>
diff --git a/guide/C/ch_reports.xml b/guide/C/ch_reports.xml
index 809b933..6f7adc9 100644
--- a/guide/C/ch_reports.xml
+++ b/guide/C/ch_reports.xml
@@ -92,7 +92,7 @@ Configuration.</para>
     <itemizedlist>
       <listitem>
         <para>Debit and Credit subtotals can be displayed, and within
-        a grouping section, if debit totals > credit totals, the group
+        a grouping section, if debit totals > credit totals, the group
         subtotal will be displayed in the debit column.</para>
         </listitem>
       <listitem>
diff --git a/guide/de/ch_accts.xml b/guide/de/ch_accts.xml
index 4bf0baf..cd9dd64 100644
--- a/guide/de/ch_accts.xml
+++ b/guide/de/ch_accts.xml
@@ -398,7 +398,7 @@
           <mediaobject>
             <imageobject>
               <imagedata fileref="figures/accts_DefaultExpenseAccounts.png"
-                         format="PNG" srccredit="Mechtilde Stehmann" ></imagedata>
+                         format="PNG" srccredit="Mechtilde Stehmann"></imagedata>
             </imageobject>
 
             <textobject>
diff --git a/guide/de/ch_basics.xml b/guide/de/ch_basics.xml
index a9d136a..e2c19d0 100644
--- a/guide/de/ch_basics.xml
+++ b/guide/de/ch_basics.xml
@@ -121,7 +121,7 @@
           <mediaobject>
             <imageobject role="html">
               <imagedata fileref="figures/basics_AccountRelationships.png"
-                         format="PNG" srccredit="Frank H. Ellenberger" ></imagedata>
+                         format="PNG" srccredit="Frank H. Ellenberger"></imagedata>
             </imageobject>
             <imageobject role="fo">
               <imagedata fileref="figures/basics_AccountRelationships.svg"
@@ -1164,7 +1164,7 @@ gcashdata.gnucash.7f0982.12093.LNK gcashdata.gnucash.LCK
             </imageobject>
             <imageobject role="fo">
               <imagedata fileref="figures/basics_NewAccountHierarchySetup.png"
-                         format="PNG" srccredit="Frank H. Ellenberger" ></imagedata>
+                         format="PNG" srccredit="Frank H. Ellenberger"></imagedata>
             </imageobject>
             <caption>
               <para>Die Abbildung zeigt den ersten Bildschirm
@@ -1199,7 +1199,7 @@ gcashdata.gnucash.7f0982.12093.LNK gcashdata.gnucash.LCK
             </imageobject>
             <imageobject role="fo">
               <imagedata fileref="figures/basics_NewBookOpts.png"
-                         format="PNG" srccredit="Frank H. Ellenberger" ></imagedata>
+                         format="PNG" srccredit="Frank H. Ellenberger"></imagedata>
             </imageobject>
             <caption>
               <para>Die Abbildung zeigt den zweiten Bildschirm
@@ -1228,7 +1228,7 @@ gcashdata.gnucash.7f0982.12093.LNK gcashdata.gnucash.LCK
             </imageobject>
             <imageobject role="fo">
               <imagedata fileref="figures/basics_NewAccountHierarchySetup_currency.png"
-                         format="PNG" srccredit="Frank H. Ellenberger" ></imagedata>
+                         format="PNG" srccredit="Frank H. Ellenberger"></imagedata>
             </imageobject>
             <caption>
             <para>Die Abbildung zeigt den dritten Bildschirm des
@@ -1258,7 +1258,7 @@ gcashdata.gnucash.7f0982.12093.LNK gcashdata.gnucash.LCK
             </imageobject>
             <imageobject role="fo">
               <imagedata fileref="figures/basics_NewAccountHierarchySetup_Accounts.png"
-                         format="PNG" srccredit="Frank H. Ellenberger" ></imagedata>
+                         format="PNG" srccredit="Frank H. Ellenberger"></imagedata>
             </imageobject>
             <caption>
             <para>Die Abbildung zeigt den vierten Bildschirm
@@ -1292,7 +1292,7 @@ gcashdata.gnucash.7f0982.12093.LNK gcashdata.gnucash.LCK
             </imageobject>
             <imageobject role="fo">
               <imagedata fileref="figures/basics_NewAccountHierarchySetup_Setup.png"
-                         format="PNG" srccredit="Frank H. Ellenberger" ></imagedata>
+                         format="PNG" srccredit="Frank H. Ellenberger"></imagedata>
             </imageobject>
             <caption>
               <para>Die Abbildung zeigt den fünften Bildschirm
@@ -1319,7 +1319,7 @@ gcashdata.gnucash.7f0982.12093.LNK gcashdata.gnucash.LCK
             </imageobject>
             <imageobject role="fo">
               <imagedata fileref="figures/basics_NewAccountHierarchySetup_Finish.png"
-                         format="PNG" srccredit="Frank H. Ellenberger" ></imagedata>
+                         format="PNG" srccredit="Frank H. Ellenberger"></imagedata>
             </imageobject>
             <caption>
               <para>Die Abbildung zeigt den letzten Bildschirm des
@@ -1350,7 +1350,7 @@ gcashdata.gnucash.7f0982.12093.LNK gcashdata.gnucash.LCK
               
               <imageobject role="fo">
                 <imagedata fileref="figures/basics_EmptyAccounts.png"
-                           format="PNG" srccredit="Frank H. Ellenberger" ></imagedata>
+                           format="PNG" srccredit="Frank H. Ellenberger"></imagedata>
               </imageobject>
             </mediaobject>
           </screenshot>
diff --git a/guide/de/ch_cc.xml b/guide/de/ch_cc.xml
index 180f368..2758a09 100644
--- a/guide/de/ch_cc.xml
+++ b/guide/de/ch_cc.xml
@@ -182,7 +182,7 @@
             <mediaobject>
               <imageobject>
                 <imagedata fileref="figures/cc_Reversing_Transaction_1.png"
-                           format="PNG" srccredit="Mechtilde Stehmann" ></imagedata>
+                           format="PNG" srccredit="Mechtilde Stehmann"></imagedata>
               </imageobject>
 
               <textobject>
@@ -200,7 +200,7 @@
             <mediaobject>
               <imageobject>
                 <imagedata fileref="figures/cc_Reversing_Transaction_2.png"
-                           format="PNG" srccredit="Mechtilde Stehmann" ></imagedata>
+                           format="PNG" srccredit="Mechtilde Stehmann"></imagedata>
               </imageobject>
 
               <textobject>
@@ -237,7 +237,7 @@
       <mediaobject>
         <imageobject>
           <imagedata fileref="figures/cc_accounts.png" format="PNG"
-                     srccredit="Mechtilde Stehmann" ></imagedata>
+                     srccredit="Mechtilde Stehmann"></imagedata>
         </imageobject>
 
         <textobject>
@@ -264,7 +264,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_purchases.png" format="PNG"
-                       srccredit="Mechtilde Stehmann" ></imagedata>
+                       srccredit="Mechtilde Stehmann"></imagedata>
           </imageobject>
 
           <textobject>
@@ -292,7 +292,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_refund.png" format="PNG"
-                       srccredit="Mechtilde Stehmann" ></imagedata>
+                       srccredit="Mechtilde Stehmann"></imagedata>
           </imageobject>
 
           <textobject>
@@ -317,7 +317,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_interest.png" format="PNG"
-                       srccredit="Mechtilde Stehmann" ></imagedata>
+                       srccredit="Mechtilde Stehmann"></imagedata>
           </imageobject>
 
           <textobject>
@@ -347,7 +347,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_reconcile_init.png" format="PNG"
-                       srccredit="Mechtilde Stehmann" ></imagedata>
+                       srccredit="Mechtilde Stehmann"></imagedata>
           </imageobject>
 
           <textobject>
@@ -367,7 +367,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_reconcile.png" format="PNG"
-                       srccredit="Mechtilde Stehmann" ></imagedata>
+                       srccredit="Mechtilde Stehmann"></imagedata>
           </imageobject>
 
           <textobject>
@@ -396,7 +396,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_payment.png" format="PNG"
-                       srccredit="Mechtilde Stehmann" ></imagedata>
+                       srccredit="Mechtilde Stehmann"></imagedata>
           </imageobject>
 
           <textobject>
@@ -416,7 +416,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_final.png" format="PNG"
-                       srccredit="Mechtilde Stehmann" ></imagedata>
+                       srccredit="Mechtilde Stehmann"></imagedata>
           </imageobject>
 
           <textobject>
diff --git a/guide/de/ch_currency.xml b/guide/de/ch_currency.xml
index 34e7f4c..70a6d21 100644
--- a/guide/de/ch_currency.xml
+++ b/guide/de/ch_currency.xml
@@ -301,7 +301,7 @@
          Wenn die Schaltfläche <guibutton>Kurse abrufen</guibutton> deaktiviert ist, 
          bedeutet das, dass das <application>Perl</application> Modul <application>Finance::Quote</application> nicht installiert ist. 
          Für Informationen, wie es zu installieren ist, schauen Sie bitte unter  
-         <xref linkend="invest-stockprice-auto2" ></xref>
+         <xref linkend="invest-stockprice-auto2"></xref>
       </para></note>
 
       <para><screenshot id="currency_AfterGetOnlineQuotes">
diff --git a/guide/de/ch_invest.xml b/guide/de/ch_invest.xml
index 3185d28..d1a5261 100644
--- a/guide/de/ch_invest.xml
+++ b/guide/de/ch_invest.xml
@@ -910,8 +910,7 @@ Einnahmen
         <mediaobject>
            <imageobject role="html">
              <imagedata fileref="figures/invest_setup_current.png" format="PNG"
-                        srccredit="Mechtilde Stehmann" width="510px"
-                        ></imagedata>
+                        srccredit="Mechtilde Stehmann" width="510px"></imagedata>
            </imageobject>
            <imageobject role="fo">
              <imagedata fileref="figures/invest_setup_current.png" format="PNG"
@@ -1344,7 +1343,7 @@ Einnahmen
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_stockvalue_report_options.png"
-                       format="PNG" srccredit="Mechtilde Stehmann" ></imagedata>
+                       format="PNG" srccredit="Mechtilde Stehmann"></imagedata>
           </imageobject>
 
           <textobject>
@@ -1383,7 +1382,7 @@ Einnahmen
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_stockvalue_report.png"
-                       format="PNG" srccredit="Mechtilde Stehmann" ></imagedata>
+                       format="PNG" srccredit="Mechtilde Stehmann"></imagedata>
           </imageobject>
 
           <textobject>
@@ -1913,7 +1912,7 @@ Einnahmen
               </imageobject>
               <imageobject role="fo">
                 <imagedata fileref="figures/investLots2_BeforeScrub1Lot.png"
-                           format="PNG" srccredit="Chris Good" ></imagedata>
+                           format="PNG" srccredit="Chris Good"></imagedata>
               </imageobject>
 
               <textobject>
@@ -2224,7 +2223,7 @@ Der folgende Teil befindet sich gerade in Bearbeitung.
                   </imageobject>
                   <imageobject role="fo">
                     <imagedata fileref="figures/investLots0_RegB4Scrub.png"
-                               format="PNG" srccredit="Chris Good" ></imagedata>
+                               format="PNG" srccredit="Chris Good"></imagedata>
                   </imageobject>
 
                   <textobject>
@@ -2267,7 +2266,7 @@ Der folgende Teil befindet sich gerade in Bearbeitung.
                   </imageobject>
                   <imageobject role="fo">
                     <imagedata fileref="figures/investLots1_BeforeCreateLot.png"
-                               format="PNG" srccredit="Chris Good" ></imagedata>
+                               format="PNG" srccredit="Chris Good"></imagedata>
                   </imageobject>
 
                   <textobject>
@@ -2298,7 +2297,7 @@ Der folgende Teil befindet sich gerade in Bearbeitung.
           </listitem>
 
           <listitem>
-            <para>Click the <guilabel> >> </guilabel> button to link the buy
+            <para>Click the <guilabel>>></guilabel> button to link the buy
             split with the highlighted lot. The split moves from the <guilabel>
             Splits free</guilabel> panel to the <guilabel>Splits in Lot
             </guilabel> panel.</para>
@@ -2315,7 +2314,7 @@ Der folgende Teil befindet sich gerade in Bearbeitung.
           </listitem>
 
           <listitem>
-            <para>Click the <guilabel> >> </guilabel> button to link the sell
+            <para>Click the <guilabel>>></guilabel> button to link the sell
               split with the highlighted lot.</para>
           </listitem>
 
@@ -2338,7 +2337,7 @@ Der folgende Teil befindet sich gerade in Bearbeitung.
                   </imageobject>
                   <imageobject role="fo">
                     <imagedata fileref="figures/investLots2_BeforeScrub1Lot.png"
-                               format="PNG" srccredit="Chris Good" ></imagedata>
+                               format="PNG" srccredit="Chris Good"></imagedata>
                   </imageobject>
 
                   <textobject>
@@ -2463,7 +2462,7 @@ Der folgende Teil befindet sich gerade in Bearbeitung.
               </imageobject>
               <imageobject role="fo">
                 <imagedata fileref="figures/invest2Lots0RegB4Scrub.png"
-                           format="PNG" srccredit="Chris Good" ></imagedata>
+                           format="PNG" srccredit="Chris Good"></imagedata>
               </imageobject>
 
               <textobject>
@@ -2498,7 +2497,7 @@ Der folgende Teil befindet sich gerade in Bearbeitung.
                   </imageobject>
                   <imageobject role="fo">
                     <imagedata fileref="figures/invest2Lots1B4Scrub.png"
-                               format="PNG" srccredit="Chris Good" ></imagedata>
+                               format="PNG" srccredit="Chris Good"></imagedata>
                   </imageobject>
 
                   <textobject>
@@ -2529,7 +2528,7 @@ Der folgende Teil befindet sich gerade in Bearbeitung.
                   </imageobject>
                   <imageobject role="fo">
                     <imagedata fileref="figures/invest2Lots2LotsAftScrubAcct.png"
-                               format="PNG" srccredit="Chris Good" ></imagedata>
+                               format="PNG" srccredit="Chris Good"></imagedata>
                   </imageobject>
 
                   <textobject>
@@ -2570,7 +2569,7 @@ Der folgende Teil befindet sich gerade in Bearbeitung.
                   </imageobject>
                   <imageobject role="fo">
                     <imagedata fileref="figures/invest2Lots3RegAftScrubAcct.png"
-                               format="PNG" srccredit="Chris Good" ></imagedata>
+                               format="PNG" srccredit="Chris Good"></imagedata>
                   </imageobject>
 
                   <textobject>
@@ -2623,7 +2622,7 @@ Der folgende Teil befindet sich gerade in Bearbeitung.
               </imageobject>
               <imageobject role="fo">
                 <imagedata fileref="figures/investLotsSplitReg.png"
-                           format="PNG" srccredit="Chris Good" ></imagedata>
+                           format="PNG" srccredit="Chris Good"></imagedata>
               </imageobject>
 
               <textobject>
@@ -2649,7 +2648,7 @@ Der folgende Teil befindet sich gerade in Bearbeitung.
               </imageobject>
               <imageobject role="fo">
                 <imagedata fileref="figures/investLotsSplitLot0.png"
-                           format="PNG" srccredit="Chris Good" ></imagedata>
+                           format="PNG" srccredit="Chris Good"></imagedata>
               </imageobject>
 
               <textobject>
@@ -2675,7 +2674,7 @@ Der folgende Teil befindet sich gerade in Bearbeitung.
               </imageobject>
               <imageobject role="fo">
                 <imagedata fileref="figures/investLotsSplitLot1.png"
-                           format="PNG" srccredit="Chris Good" ></imagedata>
+                           format="PNG" srccredit="Chris Good"></imagedata>
               </imageobject>
 
               <textobject>
@@ -2741,7 +2740,7 @@ Der folgende Teil befindet sich gerade in Bearbeitung.
                   </imageobject>
                   <imageobject role="fo">
                     <imagedata fileref="figures/investLots4_AfterScrub1LotReg.png"
-                               format="PNG" srccredit="Chris Good" ></imagedata>
+                               format="PNG" srccredit="Chris Good"></imagedata>
                   </imageobject>
 
                   <textobject>
@@ -2809,7 +2808,7 @@ Der folgende Teil befindet sich gerade in Bearbeitung.
           </imageobject>
           <imageobject role="fo">
             <imagedata fileref="figures/invest_dividendcash.png"
-                       format="PNG" srccredit="Mechtilde Stehmann" ></imagedata>
+                       format="PNG" srccredit="Mechtilde Stehmann"></imagedata>
           </imageobject>
 
           <textobject>
@@ -2964,7 +2963,7 @@ Der folgende Teil befindet sich gerade in Bearbeitung.
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_split1.png"
-                       format="PNG" srccredit="Mechtilde Stehmann" ></imagedata>
+                       format="PNG" srccredit="Mechtilde Stehmann"></imagedata>
           </imageobject>
 
           <textobject>
@@ -2983,7 +2982,7 @@ Der folgende Teil befindet sich gerade in Bearbeitung.
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_split2.png"
-                       format="PNG" srccredit="Mechtilde Stehmann" ></imagedata>
+                       format="PNG" srccredit="Mechtilde Stehmann"></imagedata>
           </imageobject>
 
           <textobject>
@@ -3037,7 +3036,7 @@ Der folgende Teil befindet sich gerade in Bearbeitung.
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_split3.png"
-                       format="PNG" srccredit="Mechtilde Stehmann" ></imagedata>
+                       format="PNG" srccredit="Mechtilde Stehmann"></imagedata>
           </imageobject>
 
           <textobject>
@@ -3058,7 +3057,7 @@ Der folgende Teil befindet sich gerade in Bearbeitung.
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_split4.png"
-                       format="PNG" srccredit="Mechtilde Stehmann" ></imagedata>
+                       format="PNG" srccredit="Mechtilde Stehmann"></imagedata>
           </imageobject>
 
           <textobject>
@@ -3078,7 +3077,7 @@ Der folgende Teil befindet sich gerade in Bearbeitung.
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_simplesplit1.png"
-                       format="PNG" srccredit="Mechtilde Stehmann" ></imagedata>
+                       format="PNG" srccredit="Mechtilde Stehmann"></imagedata>
           </imageobject>
 
           <textobject>
@@ -3120,7 +3119,7 @@ Der folgende Teil befindet sich gerade in Bearbeitung.
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_merge2.png"
-                       format="PNG" srccredit="Mechtilde Stehmann" ></imagedata>
+                       format="PNG" srccredit="Mechtilde Stehmann"></imagedata>
           </imageobject>
 
           <textobject>
@@ -3170,7 +3169,7 @@ Der folgende Teil befindet sich gerade in Bearbeitung.
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_merge3.png"
-                       format="PNG" srccredit="Mechtilde Stehmann" ></imagedata>
+                       format="PNG" srccredit="Mechtilde Stehmann"></imagedata>
           </imageobject>
 
           <textobject>
@@ -3193,7 +3192,7 @@ Der folgende Teil befindet sich gerade in Bearbeitung.
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_stockmerge1.png"
-                       format="PNG" srccredit="Mechtilde Stehmann" ></imagedata>
+                       format="PNG" srccredit="Mechtilde Stehmann"></imagedata>
           </imageobject>
 
           <textobject>
diff --git a/guide/de/gnucash-guide.xml b/guide/de/gnucash-guide.xml
index 83ff08f..1397a8f 100644
--- a/guide/de/gnucash-guide.xml
+++ b/guide/de/gnucash-guide.xml
@@ -444,8 +444,8 @@
     <title>Rückmeldung</title>
       <para>Um bezüglich des Programms oder dieser Dokumentation einen Fehler
         zu melden oder einen Verbesserungsvorschlag einzureichen, folgen Sie den
-        Anweisungen auf der <ulink url="https://wiki.gnucash.org/wiki/De/Feedback"
-          >Feedbackseite des GnuCash-Wikis</ulink> und verwenden das
+        Anweisungen auf der 
+        <ulink url="&url-wiki-de;Feedback">Feedbackseite des GnuCash-Wikis</ulink> und verwenden das
         <ulink url="&url-bug-start;">&appname; Bug Tracking System</ulink>. Zunächst
         <ulink url="&url-bug-browse;">blättern</ulink> oder 
         <ulink url="&url-bug-search;">suchen</ulink> Sie, um festzustellen,
diff --git a/guide/ja/ch_accts.xml b/guide/ja/ch_accts.xml
index 3d3d7c2..76e482b 100644
--- a/guide/ja/ch_accts.xml
+++ b/guide/ja/ch_accts.xml
@@ -39,7 +39,7 @@ Translators:
     <screenshot id="accts-AccountRelationships">
 <mediaobject>
         <imageobject> <imagedata fileref="figures/basics_AccountRelationships.png"
-format="PNG" srccredit="Geert Janssens" ></imagedata> </imageobject>
+format="PNG" srccredit="Geert Janssens"></imagedata> </imageobject>
         <textobject>
           <phrase>基本勘定科目の関係</phrase>
         </textobject>
@@ -251,7 +251,7 @@ format="PNG" srccredit="Cristian Marchi"></imagedata> </imageobject>
         <screenshot id="accts-DefaultExpenseAccounts">
 <mediaobject>
             <imageobject> <imagedata fileref="figures/accts_DefaultExpenseAccounts.png"
-format="PNG" srccredit="Cristian Marchi" ></imagedata> </imageobject>
+format="PNG" srccredit="Cristian Marchi"></imagedata> </imageobject>
 
             <textobject>
               <phrase>いくつかのデフォルト費用勘定科目</phrase>
diff --git a/guide/ja/ch_basics.xml b/guide/ja/ch_basics.xml
index f46f633..05590d2 100644
--- a/guide/ja/ch_basics.xml
+++ b/guide/ja/ch_basics.xml
@@ -90,7 +90,7 @@
 <screenshot id="basics-AccountRelationships">
 <mediaobject>
             <imageobject> <imagedata fileref="figures/basics_AccountRelationships.png"
-format="PNG" srccredit="Geert Janssens" ></imagedata> </imageobject>
+format="PNG" srccredit="Geert Janssens"></imagedata> </imageobject>
 
             <textobject>
               <phrase>基本勘定科目の関係</phrase>
@@ -213,7 +213,7 @@ linkend="basics-files1"/>を参照してください。</para>
       <screenshot id="basics-TipOfDay">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/basics_TipOfDay.png" format="PNG"
-srccredit="Cristian Marchi" ></imagedata> </imageobject>
+srccredit="Cristian Marchi"></imagedata> </imageobject>
 
           <textobject>
             <phrase>今日のヒント</phrase>
@@ -240,7 +240,7 @@ srccredit="Cristian Marchi" ></imagedata> </imageobject>
       <screenshot id="basics-Accounts">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/basics_Accounts.png" format="PNG"
-srccredit="Cristian Marchi" ></imagedata> </imageobject>
+srccredit="Cristian Marchi"></imagedata> </imageobject>
 
           <textobject>
             <phrase>勘定科目ツリーウィンドウ</phrase>
@@ -286,7 +286,7 @@ srccredit="Cristian Marchi" ></imagedata> </imageobject>
 fileref="figures/basics_CheckAccount.png" format="PNG" srccredit="Bengt
 Thuree" width="510"></imagedata> </imageobject> <imageobject role="fo">
 <imagedata fileref="figures/basics_CheckAccount.png" format="PNG"
-srccredit="Bengt Thuree" ></imagedata> </imageobject>
+srccredit="Bengt Thuree"></imagedata> </imageobject>
 
           <textobject>
             <phrase>当座預金勘定科目記録簿</phrase>
@@ -718,7 +718,7 @@ fileref="figures/basics_NewAccountHierarchySetup.png" format="PNG"
 srccredit="Cristian Marchi" width="510"></imagedata> </imageobject>
 <imageobject role="fo"> <imagedata
 fileref="figures/basics_NewAccountHierarchySetup.png" format="PNG"
-srccredit="Cristian Marchi" ></imagedata> </imageobject>
+srccredit="Cristian Marchi"></imagedata> </imageobject>
         
           <textobject>
             <phrase>新規勘定科目階層のセットアップアシスタント</phrase>
@@ -746,7 +746,7 @@ fileref="figures/basics_NewAccountHierarchySetup_currency.png" format="PNG"
 srccredit="Cristian Marchi" width="510"></imagedata> </imageobject>
 <imageobject role="fo"> <imagedata
 fileref="figures/basics_NewAccountHierarchySetup_currency.png" format="PNG"
-srccredit="Cristian Marchi" ></imagedata> </imageobject>
+srccredit="Cristian Marchi"></imagedata> </imageobject>
 
           <textobject>
             <phrase>新規勘定科目階層のセットアップアシスタント - 通貨</phrase>
@@ -773,7 +773,7 @@ fileref="figures/basics_NewAccountHierarchySetup_Accounts.png" format="PNG"
 srccredit="Cristian Marchi" width="510"></imagedata> </imageobject>
 <imageobject role="fo"> <imagedata
 fileref="figures/basics_NewAccountHierarchySetup_Accounts.png" format="PNG"
-srccredit="Cristian Marchi" ></imagedata> </imageobject>
+srccredit="Cristian Marchi"></imagedata> </imageobject>
 
           <textobject>
             <phrase>新規勘定科目階層のセットアップアシスタント - 勘定科目の選択</phrase>
@@ -796,7 +796,7 @@ fileref="figures/basics_NewAccountHierarchySetup_Setup.png" format="PNG"
 srccredit="Cristian Marchi" width="510"></imagedata> </imageobject>
 <imageobject role="fo"> <imagedata
 fileref="figures/basics_NewAccountHierarchySetup_Setup.png" format="PNG"
-srccredit="Cristian Marchi" ></imagedata> </imageobject>
+srccredit="Cristian Marchi"></imagedata> </imageobject>
 
           <textobject>
             <phrase>新規勘定科目階層のセットアップアシスタント - 設定</phrase>
@@ -818,7 +818,7 @@ fileref="figures/basics_NewAccountHierarchySetup_Finish.png" format="PNG"
 srccredit="Cristian Marchi" width="510"></imagedata> </imageobject>
 <imageobject role="fo"> <imagedata
 fileref="figures/basics_NewAccountHierarchySetup_Finish.png" format="PNG"
-srccredit="Cristian Marchi" ></imagedata> </imageobject>
+srccredit="Cristian Marchi"></imagedata> </imageobject>
 
           <textobject>
             <phrase>新規勘定科目階層のセットアップアシスタント - 終了</phrase>
@@ -839,7 +839,7 @@ srccredit="Cristian Marchi" ></imagedata> </imageobject>
 fileref="figures/basics_EmptyAccounts.png" format="PNG" srccredit="Cristian
 Marchi" width="510"></imagedata> </imageobject> <imageobject role="fo">
 <imagedata fileref="figures/basics_EmptyAccounts.png" format="PNG"
-srccredit="Cristian Marchi" ></imagedata> </imageobject>
+srccredit="Cristian Marchi"></imagedata> </imageobject>
 
               <textobject>
                 <phrase>テストファイルを表示するメインウィンドウ</phrase>
diff --git a/guide/ja/ch_cc.xml b/guide/ja/ch_cc.xml
index 286aec5..50015d6 100644
--- a/guide/ja/ch_cc.xml
+++ b/guide/ja/ch_cc.xml
@@ -182,7 +182,7 @@
         <screenshot id="cc-Reversing-Transaction-1">
 <mediaobject>
               <imageobject> <imagedata fileref="figures/cc_Reversing_Transaction_1.png"
-format="PNG" srccredit="Bengt Thuree" ></imagedata> </imageobject>
+format="PNG" srccredit="Bengt Thuree"></imagedata> </imageobject>
 
               <textobject>
                 <phrase>クレジットカード購入の返金</phrase>
@@ -197,7 +197,7 @@ format="PNG" srccredit="Bengt Thuree" ></imagedata> </imageobject>
         <screenshot id="cc-Reversing-Transaction-2">
 <mediaobject>
               <imageobject> <imagedata fileref="figures/cc_Reversing_Transaction_2.png"
-format="PNG" srccredit="Bengt Thuree" ></imagedata> </imageobject>
+format="PNG" srccredit="Bengt Thuree"></imagedata> </imageobject>
 
               <textobject>
                 <phrase>クレジットカード購入の返金</phrase>
@@ -230,7 +230,7 @@ format="PNG" srccredit="Bengt Thuree" ></imagedata> </imageobject>
     <screenshot id="cc-accounts">
 <mediaobject>
         <imageobject> <imagedata fileref="figures/cc_accounts.png" format="PNG"
-srccredit="Bengt Thuree" ></imagedata> </imageobject>
+srccredit="Bengt Thuree"></imagedata> </imageobject>
 
         <textobject>
           <phrase>開始時の勘定科目構造</phrase>
@@ -257,7 +257,7 @@ Usから125ドル分の食品と雑貨を購入します(85ドルの食品と40
       <screenshot id="cc-purchases">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/cc_purchases.png" format="PNG"
-srccredit="Bengt Thuree" ></imagedata> </imageobject>
+srccredit="Bengt Thuree"></imagedata> </imageobject>
 
           <textobject>
             <phrase>最初のクレジットカードでの購入</phrase>
@@ -282,7 +282,7 @@ srccredit="Bengt Thuree" ></imagedata> </imageobject>
       <screenshot id="cc-refund">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/cc_refund.png" format="PNG"
-srccredit="Bengt Thuree" ></imagedata> </imageobject>
+srccredit="Bengt Thuree"></imagedata> </imageobject>
 
           <textobject>
             <phrase>商品返品取引</phrase>
@@ -304,7 +304,7 @@ srccredit="Bengt Thuree" ></imagedata> </imageobject>
       <screenshot id="cc-interest">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/cc_interest.png" format="PNG"
-srccredit="Bengt Thuree" ></imagedata> </imageobject>
+srccredit="Bengt Thuree"></imagedata> </imageobject>
 
           <textobject>
             <phrase>利子請求</phrase>
@@ -329,7 +329,7 @@ srccredit="Bengt Thuree" ></imagedata> </imageobject>
       <screenshot id="cc-reconcile-init">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/cc_reconcile_init.png"
-format="PNG" srccredit="Bengt Thuree" ></imagedata> </imageobject>
+format="PNG" srccredit="Bengt Thuree"></imagedata> </imageobject>
 
           <textobject>
             <phrase>最初の照合ウィンドウ</phrase>
@@ -346,7 +346,7 @@ format="PNG" srccredit="Bengt Thuree" ></imagedata> </imageobject>
       <screenshot id="cc-reconcile">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/cc_reconcile.png" format="PNG"
-srccredit="Bengt Thuree" ></imagedata> </imageobject>
+srccredit="Bengt Thuree"></imagedata> </imageobject>
 
           <textobject>
             <phrase>メイン照合ウィンドウ</phrase>
@@ -373,7 +373,7 @@ srccredit="Bengt Thuree" ></imagedata> </imageobject>
       <screenshot id="cc-payment">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/cc_payment.png" format="PNG"
-srccredit="Bengt Thuree" ></imagedata> </imageobject>
+srccredit="Bengt Thuree"></imagedata> </imageobject>
 
           <textobject>
             <phrase>照合と支払い</phrase>
@@ -390,7 +390,7 @@ srccredit="Bengt Thuree" ></imagedata> </imageobject>
       <screenshot id="cc-final">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/cc_final.png" format="PNG"
-srccredit="Bengt Thuree" ></imagedata> </imageobject>
+srccredit="Bengt Thuree"></imagedata> </imageobject>
 
           <textobject>
             <phrase>&app;メインウィンドウ</phrase>
diff --git a/guide/ja/ch_currency.xml b/guide/ja/ch_currency.xml
index 01d1b27..56e29ae 100644
--- a/guide/ja/ch_currency.xml
+++ b/guide/ja/ch_currency.xml
@@ -250,7 +250,7 @@ srccredit="Geert Janssens" /> </imageobject>
 
       <note><para>
          <guibutton>相場表を取得</guibutton>ボタンが無効な場合、<application>Perl</application>モジュール<application>Finance::Quote</application>がインストールされていないことを意味します。
-それをインストールする方法については<xref linkend="invest-stockprice-auto2" ></xref>を参照してください。
+それをインストールする方法については<xref linkend="invest-stockprice-auto2"></xref>を参照してください。
       </para></note>
 
       <para><screenshot id="currency_AfterGetOnlineQuotes">
diff --git a/guide/ja/ch_invest.xml b/guide/ja/ch_invest.xml
index 0108dc3..17f27db 100644
--- a/guide/ja/ch_invest.xml
+++ b/guide/ja/ch_invest.xml
@@ -206,7 +206,7 @@
       <screenshot id="invest_accountspredef">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_AccountsPredef.png"
-format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
+format="PNG" srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>関心がある投資のセットアップ</phrase>
@@ -320,7 +320,7 @@ format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
       <screenshot id="invest-int">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_int1.png" format="PNG"
-srccredit="Dave Herman" ></imagedata> </imageobject>
+srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>関心がある投資のセットアップ</phrase>
@@ -337,7 +337,7 @@ srccredit="Dave Herman" ></imagedata> </imageobject>
       <screenshot id="invest-int2">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_int2.png" format="PNG"
-srccredit="Dave Herman" ></imagedata> </imageobject>
+srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>関心がある投資のセットアップ</phrase>
@@ -351,7 +351,7 @@ srccredit="Dave Herman" ></imagedata> </imageobject>
       <screenshot id="invest-int3">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_int3.png" format="PNG"
-srccredit="Dave Herman" ></imagedata> </imageobject>
+srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>関心がある投資のセットアップ</phrase>
@@ -427,7 +427,7 @@ linkend="invest-buy-new2"><emphasis>新規株式の購入</emphasis> </link>節
       <screenshot id="invest-newaccount">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_newaccount.png"
-format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
+format="PNG" srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>新規勘定科目ウィンドウ</phrase>
@@ -480,7 +480,7 @@ format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
               <screenshot id="invest-selectsecurity">
 <mediaobject>
                   <imageobject> <imagedata fileref="figures/invest_selectsecurity.png"
-format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
+format="PNG" srccredit="Dave Herman"></imagedata> </imageobject>
 
                   <textobject>
                     <phrase>証券を新規作成ウィンドウ</phrase>
@@ -534,7 +534,7 @@ format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
                   <para>完成するとこのウィンドウは次のようになります。 <screenshot id="invest-newsecurity">
 <mediaobject>
                         <imageobject> <imagedata fileref="figures/invest_newsecurity.png"
-format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
+format="PNG" srccredit="Dave Herman"></imagedata> </imageobject>
 
                         <textobject>
                           <phrase>証券を新規作成ウィンドウ</phrase>
@@ -605,7 +605,7 @@ Inc.)</quote>が設定された状態の新規勘定科目ダイアログに戻
       <screenshot id="invest-setup-current">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_setup_current.png"
-format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
+format="PNG" srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>現在のポートフォリオのセットアップ</phrase>
@@ -637,7 +637,7 @@ AMZN商品画面は次のようになります。</para>
       <screenshot id="invest-setup-portfolio1">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_setup_portfolio1.png"
-format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
+format="PNG" srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>現在のポートフォリオのセットアップ</phrase>
@@ -671,7 +671,7 @@ IBM商品画面は次のようになります。</para>
       <screenshot id="invest-setup-portfolio2">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_SetupPortfolio2.png"
-format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
+format="PNG" srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>現在のポートフォリオのセットアップ</phrase>
@@ -738,7 +738,7 @@ format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
       <screenshot id="invest-peditor">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_peditor.png" format="PNG"
-srccredit="Dave Herman" ></imagedata> </imageobject>
+srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>価格エディター</phrase>
@@ -760,7 +760,7 @@ srccredit="Dave Herman" ></imagedata> </imageobject>
       <screenshot id="invest-peditor2">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_peditor2.png" format="PNG"
-srccredit="Dave Herman" ></imagedata> </imageobject>
+srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>価格エディター</phrase>
@@ -876,7 +876,7 @@ class="directory">$HOME/gnucash-filename</filename>はデータファイルの
       <screenshot id="invest-stockvalue">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_stockvalue.png"
-format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
+format="PNG" srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>株価の表示</phrase>
@@ -901,7 +901,7 @@ role="strong">平均残高</emphasis>帳票のカスタマイズ画面です。<
 <mediaobject>
           <imageobject> <imagedata
 fileref="figures/invest_stockvalue_report_options.png" format="PNG"
-srccredit="Dave Herman" ></imagedata> </imageobject>
+srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>帳票の価格の情報源の決定</phrase>
@@ -931,7 +931,7 @@ srccredit="Dave Herman" ></imagedata> </imageobject>
       <screenshot id="invest-stockvalue-report">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_stockvalue_report.png"
-format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
+format="PNG" srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase><guilabel>時間的に最も近い</guilabel>価格の情報源に基づいた資産の棒グラフ帳票</phrase>
@@ -1138,7 +1138,7 @@ NET_SALEは、売却により受け取った正味の金額で、GROSS_SALE - CO
       <screenshot id="invest-sellstock">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_sellstock.png" format="PNG"
-srccredit="Dave Herman" ></imagedata> </imageobject>
+srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>株式売却の例</phrase>
@@ -1151,7 +1151,7 @@ srccredit="Dave Herman" ></imagedata> </imageobject>
       <screenshot id="invest-sellstock2">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_sellstock2.png"
-format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
+format="PNG" srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>株式売却の例</phrase>
@@ -1258,7 +1258,7 @@ format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
       <screenshot id="invest-sellstockLoss">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_sellstockLoss.png"
-format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
+format="PNG" srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>損失を伴う株式売却の例</phrase>
@@ -1271,7 +1271,7 @@ format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
       <screenshot id="invest-sellstockLoss2">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_sellstockLoss2.png"
-format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
+format="PNG" srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>損失を伴う株式売却の例</phrase>
@@ -1300,7 +1300,7 @@ format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
       <screenshot id="invest-dividendcash1">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_dividendcash.png"
-format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
+format="PNG" srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>現金配当取引の例</phrase>
@@ -1334,7 +1334,7 @@ format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
       <screenshot id="invest-dividendreinvest1">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_dividendreinvest1.png"
-format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
+format="PNG" srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>配当再投資取引の例</phrase>
@@ -1346,7 +1346,7 @@ format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
       <screenshot id="invest-dividendreinvest2">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_dividendreinvest2.png"
-format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
+format="PNG" srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>配当再投資取引の例</phrase>
@@ -1383,7 +1383,7 @@ format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
       <screenshot id="invest-split1">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_split1.png" format="PNG"
-srccredit="Dave Herman" ></imagedata> </imageobject>
+srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>株式分割アシスタントステップ1の画面 </phrase>
@@ -1398,7 +1398,7 @@ srccredit="Dave Herman" ></imagedata> </imageobject>
       <screenshot id="invest-split2">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_split2.png" format="PNG"
-srccredit="Dave Herman" ></imagedata> </imageobject>
+srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>株式分割アシスタントステップ2の画面 - 勘定科目/株式の選択
@@ -1442,7 +1442,7 @@ srccredit="Dave Herman" ></imagedata> </imageobject>
       <screenshot id="invest-split3">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_split3.png" format="PNG"
-srccredit="Dave Herman" ></imagedata> </imageobject>
+srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>株式分割アシスタントステップ3の画面 - 株式分割の詳細 </phrase>
@@ -1459,7 +1459,7 @@ srccredit="Dave Herman" ></imagedata> </imageobject>
       <screenshot id="invest-split4">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_split4.png" format="PNG"
-srccredit="Dave Herman" ></imagedata> </imageobject>
+srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>株式分割アシスタントステップ4の画面 - 現金の分配 </phrase>
@@ -1475,7 +1475,7 @@ srccredit="Dave Herman" ></imagedata> </imageobject>
       <screenshot id="invest-simplesplit1">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_simplesplit1.png"
-format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
+format="PNG" srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>株式記録簿での単純な株式分割の例</phrase>
@@ -1508,7 +1508,7 @@ format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
       <screenshot id="invest-merge2">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_merge2.png" format="PNG"
-srccredit="Dave Herman" ></imagedata> </imageobject>
+srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>株式分割アシスタントステップ2の画面 </phrase>
@@ -1553,7 +1553,7 @@ srccredit="Dave Herman" ></imagedata> </imageobject>
       <screenshot id="invest-merge3">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_merge3.png" format="PNG"
-srccredit="Dave Herman" ></imagedata> </imageobject>
+srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>株式分割アシスタントステップ3の画面 </phrase>
@@ -1571,7 +1571,7 @@ srccredit="Dave Herman" ></imagedata> </imageobject>
       <screenshot id="invest-stockmerge1">
 <mediaobject>
           <imageobject> <imagedata fileref="figures/invest_stockmerge1.png"
-format="PNG" srccredit="Dave Herman" ></imagedata> </imageobject>
+format="PNG" srccredit="Dave Herman"></imagedata> </imageobject>
 
           <textobject>
             <phrase>株式記録簿における適度に複雑な株式分割の例</phrase>
diff --git a/guide/pt/ch_accts.xml b/guide/pt/ch_accts.xml
index 464b014..c9017e8 100644
--- a/guide/pt/ch_accts.xml
+++ b/guide/pt/ch_accts.xml
@@ -43,7 +43,7 @@ Translators:
       <mediaobject>
         <imageobject role="html">
           <imagedata fileref="figures/basics_AccountRelationships.png"
-                     format="PNG" srccredit="Pedro Albuquerque" ></imagedata>
+                     format="PNG" srccredit="Pedro Albuquerque"></imagedata>
         </imageobject>
 
         <imageobject role="fo">
@@ -304,7 +304,7 @@ Translators:
           <mediaobject>
             <imageobject>
               <imagedata fileref="figures/accts_DefaultExpenseAccounts.png"
-                         format="PNG" srccredit="Pedro Albuquerque" ></imagedata>
+                         format="PNG" srccredit="Pedro Albuquerque"></imagedata>
             </imageobject>
 
             <textobject>
diff --git a/guide/pt/ch_basics.xml b/guide/pt/ch_basics.xml
index 9bc878c..e828642 100644
--- a/guide/pt/ch_basics.xml
+++ b/guide/pt/ch_basics.xml
@@ -107,7 +107,7 @@
           <mediaobject>
             <imageobject role="html">
               <imagedata fileref="figures/basics_AccountRelationships.png"
-                         format="PNG" srccredit="Pedro Albuquerque" ></imagedata>
+                         format="PNG" srccredit="Pedro Albuquerque"></imagedata>
             </imageobject>
             <imageobject role="fo">
               <imagedata fileref="figures/basics_AccountRelationships.svg"
@@ -265,7 +265,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/basics_TipOfDay.png" format="PNG"
-                       srccredit="Pedro Albuquerque" ></imagedata>
+                       srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -294,7 +294,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/basics_Accounts.png" format="PNG"
-                       srccredit="Pedro Albuquerque" ></imagedata>
+                       srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -349,7 +349,7 @@
           
           <imageobject role="fo">
             <imagedata fileref="figures/basics_CheckAccount.png" format="PNG"
-                       srccredit="Pedro Albuquerque" ></imagedata>
+                       srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -976,7 +976,7 @@ todos na mesma pasta que o seu ficheiro primário de dados. O que cada um destes
 
           <imageobject role="fo">
             <imagedata fileref="figures/basics_NewAccountHierarchySetup.png"
-                       format="PNG" srccredit="Pedro Albuquerque" ></imagedata>
+                       format="PNG" srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
         
           <textobject>
@@ -1008,7 +1008,7 @@ todos na mesma pasta que o seu ficheiro primário de dados. O que cada um destes
 
           <imageobject role="fo">
             <imagedata fileref="figures/basics_NewAccountHierarchySetup_currency.png"
-                       format="PNG" srccredit="Pedro Albuquerque" ></imagedata>
+                       format="PNG" srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -1037,7 +1037,7 @@ todos na mesma pasta que o seu ficheiro primário de dados. O que cada um destes
 
           <imageobject role="fo">
             <imagedata fileref="figures/basics_NewAccountHierarchySetup_book_options.png"
-                       format="PNG" srccredit="Pedro Albuquerque" ></imagedata>
+                       format="PNG" srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -1069,7 +1069,7 @@ todos na mesma pasta que o seu ficheiro primário de dados. O que cada um destes
 
           <imageobject role="fo">
             <imagedata fileref="figures/basics_NewAccountHierarchySetup_Accounts.png"
-                       format="PNG" srccredit="Pedro Albuquerque" ></imagedata>
+                       format="PNG" srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -1099,7 +1099,7 @@ todos na mesma pasta que o seu ficheiro primário de dados. O que cada um destes
 
           <imageobject role="fo">
             <imagedata fileref="figures/basics_NewAccountHierarchySetup_Setup.png"
-                       format="PNG" srccredit="Pedro Albuquerque" ></imagedata>
+                       format="PNG" srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -1125,7 +1125,7 @@ todos na mesma pasta que o seu ficheiro primário de dados. O que cada um destes
 
           <imageobject role="fo">
             <imagedata fileref="figures/basics_NewAccountHierarchySetup_Finish.png"
-                       format="PNG" srccredit="Pedro Albuquerque" ></imagedata>
+                       format="PNG" srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -1155,7 +1155,7 @@ todos na mesma pasta que o seu ficheiro primário de dados. O que cada um destes
               
               <imageobject role="fo">
                 <imagedata fileref="figures/basics_EmptyAccounts.png"
-                           format="PNG" srccredit="Pedro Albuquerque" ></imagedata>
+                           format="PNG" srccredit="Pedro Albuquerque"></imagedata>
               </imageobject>
 
               <textobject>
diff --git a/guide/pt/ch_cc.xml b/guide/pt/ch_cc.xml
index caba2cc..49f9bfe 100644
--- a/guide/pt/ch_cc.xml
+++ b/guide/pt/ch_cc.xml
@@ -188,7 +188,7 @@
             <mediaobject>
               <imageobject>
                 <imagedata fileref="figures/cc_Reversing_Transaction_1.png"
-                           format="PNG" srccredit="Pedro Albuquerque" ></imagedata>
+                           format="PNG" srccredit="Pedro Albuquerque"></imagedata>
               </imageobject>
 
               <textobject>
@@ -207,7 +207,7 @@
             <mediaobject>
               <imageobject>
                 <imagedata fileref="figures/cc_Reversing_Transaction_2.png"
-                           format="PNG" srccredit="Pedro Albuquerque" ></imagedata>
+                           format="PNG" srccredit="Pedro Albuquerque"></imagedata>
               </imageobject>
 
               <textobject>
@@ -246,7 +246,7 @@
       <mediaobject>
         <imageobject>
           <imagedata fileref="figures/cc_accounts.png" format="PNG"
-                     srccredit="Pedro Albuquerque" ></imagedata>
+                     srccredit="Pedro Albuquerque"></imagedata>
         </imageobject>
 
         <textobject>
@@ -275,7 +275,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_purchases.png" format="PNG"
-                       srccredit="Pedro Albuquerque" ></imagedata>
+                       srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -303,7 +303,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_refund.png" format="PNG"
-                       srccredit="Pedro Albuquerque" ></imagedata>
+                       srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -328,7 +328,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_interest.png" format="PNG"
-                       srccredit="Pedro Albuquerque" ></imagedata>
+                       srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -355,7 +355,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_reconcile_init.png" format="PNG"
-                       srccredit="Pedro Albuquerque" ></imagedata>
+                       srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -376,7 +376,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_reconcile.png" format="PNG"
-                       srccredit="Pedro Albuquerque" ></imagedata>
+                       srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -406,7 +406,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_payment.png" format="PNG"
-                       srccredit="Pedro Albuquerque" ></imagedata>
+                       srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -426,7 +426,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_final.png" format="PNG"
-                       srccredit="Pedro Albuquerque" ></imagedata>
+                       srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
diff --git a/guide/pt/ch_currency.xml b/guide/pt/ch_currency.xml
index 23de37a..4609831 100644
--- a/guide/pt/ch_currency.xml
+++ b/guide/pt/ch_currency.xml
@@ -300,7 +300,7 @@
          Se o botão <guibutton>Obter cotações</guibutton> estiver desativado, significa que o módulo 
          <application>Perl</application> <application>Finance::Quote</application> não está 
          instalado. Para informação sobre a instalação, por favor veja 
-         <xref linkend="invest-stockprice-auto2" ></xref>
+         <xref linkend="invest-stockprice-auto2"></xref>
       </para></note>
 
       <para><screenshot id="currency_AfterGetOnlineQuotes">
diff --git a/guide/pt/ch_invest.xml b/guide/pt/ch_invest.xml
index 8113829..0d4e96f 100644
--- a/guide/pt/ch_invest.xml
+++ b/guide/pt/ch_invest.xml
@@ -1222,7 +1222,7 @@ Receita
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_stockvalue_report_options.png"
-                       format="PNG" srccredit="Pedro Albuquerque" ></imagedata>
+                       format="PNG" srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -1258,7 +1258,7 @@ Receita
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_stockvalue_report.png"
-                       format="PNG" srccredit="Pedro Albuquerque" ></imagedata>
+                       format="PNG" srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -1698,7 +1698,7 @@ Receita
           </imageobject>
           <imageobject role="fo">
             <imagedata fileref="figures/invest_dividendcash.png"
-                       format="PNG" srccredit="Pedro Albuquerque" ></imagedata>
+                       format="PNG" srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -1786,7 +1786,7 @@ Receita
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_split1.png"
-                       format="PNG" srccredit="Pedro Albuquerque" ></imagedata>
+                       format="PNG" srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -1805,7 +1805,7 @@ Receita
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_split2.png"
-                       format="PNG" srccredit="Pedro Albuquerque" ></imagedata>
+                       format="PNG" srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -1856,7 +1856,7 @@ Receita
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_split3.png"
-                       format="PNG" srccredit="Pedro Albuquerque" ></imagedata>
+                       format="PNG" srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -1876,7 +1876,7 @@ Receita
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_split4.png"
-                       format="PNG" srccredit="Pedro Albuquerque" ></imagedata>
+                       format="PNG" srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -1898,7 +1898,7 @@ Receita
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_simplesplit1.png"
-                       format="PNG" srccredit="Pedro Albuquerque" ></imagedata>
+                       format="PNG" srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -1936,7 +1936,7 @@ Receita
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_merge2.png"
-                       format="PNG" srccredit="Pedro Albuquerque" ></imagedata>
+                       format="PNG" srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -1991,7 +1991,7 @@ Receita
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_merge3.png"
-                       format="PNG" srccredit="Pedro Albuquerque" ></imagedata>
+                       format="PNG" srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -2015,7 +2015,7 @@ Receita
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_stockmerge1.png"
-                       format="PNG" srccredit="Pedro Albuquerque" ></imagedata>
+                       format="PNG" srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
diff --git a/guide/ru/ch_accts.xml b/guide/ru/ch_accts.xml
index 0e00f06..84395b9 100644
--- a/guide/ru/ch_accts.xml
+++ b/guide/ru/ch_accts.xml
@@ -51,7 +51,7 @@
       <mediaobject>
         <imageobject role="html">
           <imagedata fileref="figures/basics_AccountRelationships.png"
-                     format="PNG" srccredit="DiMan" ></imagedata>
+                     format="PNG" srccredit="DiMan"></imagedata>
         </imageobject>
         
         <imageobject role="fo">
@@ -395,7 +395,7 @@
           <mediaobject>
             <imageobject>
               <imagedata fileref="figures/accts_DefaultExpenseAccounts.png"
-                         format="PNG" srccredit="DiMan" ></imagedata>
+                         format="PNG" srccredit="DiMan"></imagedata>
             </imageobject>
             
             <textobject>
diff --git a/guide/ru/ch_basics.xml b/guide/ru/ch_basics.xml
index 0ba73b8..c84f982 100644
--- a/guide/ru/ch_basics.xml
+++ b/guide/ru/ch_basics.xml
@@ -119,7 +119,7 @@
           <mediaobject>
             <imageobject role="html">
               <imagedata fileref="figures/basics_AccountRelationships.png"
-                         format="PNG" srccredit="Geert Janssens" ></imagedata>
+                         format="PNG" srccredit="Geert Janssens"></imagedata>
             </imageobject>
             <imageobject role="fo">
               <imagedata fileref="figures/basics_AccountRelationships.svg"
@@ -351,7 +351,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/basics_TipOfDay.png" format="PNG"
-                       srccredit="DiMan" ></imagedata>
+                       srccredit="DiMan"></imagedata>
           </imageobject>
 
           <textobject>
@@ -386,7 +386,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/basics_Accounts.png" format="PNG"
-                       srccredit="Cristian Marchi" ></imagedata>
+                       srccredit="Cristian Marchi"></imagedata>
           </imageobject>
 
           <textobject>
@@ -453,7 +453,7 @@
 
           <imageobject role="fo">
             <imagedata fileref="figures/basics_CheckAccount.png" format="PNG"
-                       srccredit="Bengt Thuree" ></imagedata>
+                       srccredit="Bengt Thuree"></imagedata>
           </imageobject>
 
           <textobject>
@@ -1227,7 +1227,7 @@
 
           <imageobject role="fo">
             <imagedata fileref="figures/basics_NewAccountHierarchySetup.png"
-                       format="PNG" srccredit="DiMan" ></imagedata>
+                       format="PNG" srccredit="DiMan"></imagedata>
           </imageobject>
           
           <textobject>
@@ -1262,7 +1262,7 @@
           
           <imageobject role="fo">
             <imagedata fileref="figures/basics_NewAccountHierarchySetup_Currency.png"
-                       format="PNG" srccredit="DiMan" ></imagedata>
+                       format="PNG" srccredit="DiMan"></imagedata>
           </imageobject>
           
           <textobject>
@@ -1298,7 +1298,7 @@
           
           <imageobject role="fo">
             <imagedata fileref="figures/basics_NewAccountHierarchySetup_NewBookOpts.png"
-                       format="PNG" srccredit="DiMan" ></imagedata>
+                       format="PNG" srccredit="DiMan"></imagedata>
           </imageobject>
           
           <textobject>
@@ -1335,7 +1335,7 @@
           
           <imageobject role="fo">
             <imagedata fileref="figures/basics_NewAccountHierarchySetup_Accounts.png"
-                       format="PNG" srccredit="DiMan" ></imagedata>
+                       format="PNG" srccredit="DiMan"></imagedata>
           </imageobject>
           
           <textobject>
@@ -1367,7 +1367,7 @@
           
           <imageobject role="fo">
             <imagedata fileref="figures/basics_NewAccountHierarchySetup_Setup.png"
-                       format="PNG" srccredit="DiMan" ></imagedata>
+                       format="PNG" srccredit="DiMan"></imagedata>
           </imageobject>
           
           <textobject>
@@ -1396,7 +1396,7 @@
           
           <imageobject role="fo">
             <imagedata fileref="figures/basics_NewAccountHierarchySetup_Finish.png"
-                       format="PNG" srccredit="DiMan" ></imagedata>
+                       format="PNG" srccredit="DiMan"></imagedata>
           </imageobject>
           
           <textobject>
@@ -1432,7 +1432,7 @@
           
           <imageobject role="fo">
             <imagedata fileref="figures/basics_EmptyAccounts.png"
-                       format="PNG" srccredit="DiMan" ></imagedata>
+                       format="PNG" srccredit="DiMan"></imagedata>
           </imageobject>
           
           <textobject>
diff --git a/guide/ru/ch_cc.xml b/guide/ru/ch_cc.xml
index e2b7181..8b94b00 100644
--- a/guide/ru/ch_cc.xml
+++ b/guide/ru/ch_cc.xml
@@ -231,7 +231,7 @@
             <mediaobject>
               <imageobject>
                 <imagedata fileref="figures/cc_Reversing_Transaction_1.png"
-                           format="PNG" srccredit="Bengt  Thuree" ></imagedata>
+                           format="PNG" srccredit="Bengt Thuree"></imagedata>
               </imageobject>
 
               <textobject>
@@ -252,7 +252,7 @@
             <mediaobject>
               <imageobject>
                 <imagedata fileref="figures/cc_Reversing_Transaction_2.png"
-                           format="PNG" srccredit="Bengt  Thuree" ></imagedata>
+                           format="PNG" srccredit="Bengt Thuree"></imagedata>
               </imageobject>
 
               <textobject>
@@ -295,7 +295,7 @@
       <mediaobject>
         <imageobject>
           <imagedata fileref="figures/cc_accounts.png" format="PNG"
-                     srccredit="Bengt Thuree" ></imagedata>
+                     srccredit="Bengt Thuree"></imagedata>
         </imageobject>
 
         <textobject>
@@ -329,7 +329,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_purchases.png" format="PNG"
-                       srccredit="Bengt Thuree" ></imagedata>
+                       srccredit="Bengt Thuree"></imagedata>
           </imageobject>
 
           <textobject>
@@ -360,7 +360,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_refund.png" format="PNG"
-                       srccredit="Bengt Thuree" ></imagedata>
+                       srccredit="Bengt Thuree"></imagedata>
           </imageobject>
 
           <textobject>
@@ -388,7 +388,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_interest.png" format="PNG"
-                       srccredit="Bengt Thuree" ></imagedata>
+                       srccredit="Bengt Thuree"></imagedata>
           </imageobject>
 
           <textobject>
@@ -421,7 +421,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_reconcile_init.png" format="PNG"
-                       srccredit="Bengt Thuree" ></imagedata>
+                       srccredit="Bengt Thuree"></imagedata>
           </imageobject>
 
           <textobject>
@@ -444,7 +444,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_reconcile.png" format="PNG"
-                       srccredit="Bengt Thuree" ></imagedata>
+                       srccredit="Bengt Thuree"></imagedata>
           </imageobject>
 
           <textobject>
@@ -480,7 +480,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_payment.png" format="PNG"
-                       srccredit="Bengt Thuree" ></imagedata>
+                       srccredit="Bengt Thuree"></imagedata>
           </imageobject>
 
           <textobject>
@@ -502,7 +502,7 @@
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/cc_final.png" format="PNG"
-                       srccredit="Bengt Thuree" ></imagedata>
+                       srccredit="Bengt Thuree"></imagedata>
           </imageobject>
 
           <textobject>
diff --git a/guide/ru/ch_currency.xml b/guide/ru/ch_currency.xml
index e163084..8e5df51 100644
--- a/guide/ru/ch_currency.xml
+++ b/guide/ru/ch_currency.xml
@@ -341,7 +341,7 @@
          If the <guibutton>Get Quotes</guibutton> button is disabled,
          that means that the <application>Perl</application> module <application>Finance::Quote</application> is not installed.
          For information on how to install it, please see
-         <xref linkend="invest-stockprice-auto2" ></xref>
+         <xref linkend="invest-stockprice-auto2"></xref>
       </para></note>
 
       <para><screenshot id="currency_AfterGetOnlineQuotes">
diff --git a/guide/ru/ch_invest.xml b/guide/ru/ch_invest.xml
index a601597..f94f3c2 100644
--- a/guide/ru/ch_invest.xml
+++ b/guide/ru/ch_invest.xml
@@ -1139,7 +1139,7 @@ Income
           it has already been included in the <guilabel>Buy</guilabel> value.
           The second split line will be to transfer from <emphasis>
           Assets:Bank ABC</emphasis> $5100 to balance the transaction. After the
-          splits are all correct, use the <keycap function="enter" >Enter
+          splits are all correct, use the <keycap function="enter">Enter
           </keycap> key to save the transaction. Your IBM Commodity view should
           now appear like this:
         </para>
@@ -1489,7 +1489,7 @@ Income
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_stockvalue_report_options.png"
-                       format="PNG" srccredit="Dave Herman" ></imagedata>
+                       format="PNG" srccredit="Dave Herman"></imagedata>
           </imageobject>
 
           <textobject>
@@ -1533,7 +1533,7 @@ Income
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_stockvalue_report.png"
-                       format="PNG" srccredit="Dave Herman" ></imagedata>
+                       format="PNG" srccredit="Dave Herman"></imagedata>
           </imageobject>
 
           <textobject>
@@ -2566,7 +2566,7 @@ Income
               </imageobject>
               <imageobject role="fo">
                 <imagedata fileref="figures/investLots2_BeforeScrub1Lot.png"
-                           format="PNG" srccredit="Chris Good" ></imagedata>
+                           format="PNG" srccredit="Chris Good"></imagedata>
               </imageobject>
 
               <textobject>
@@ -2881,7 +2881,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
                   </imageobject>
                   <imageobject role="fo">
                     <imagedata fileref="figures/investLots0_RegB4Scrub.png"
-                               format="PNG" srccredit="Chris Good" ></imagedata>
+                               format="PNG" srccredit="Chris Good"></imagedata>
                   </imageobject>
 
                   <textobject>
@@ -2924,7 +2924,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
                   </imageobject>
                   <imageobject role="fo">
                     <imagedata fileref="figures/investLots1_BeforeCreateLot.png"
-                               format="PNG" srccredit="Chris Good" ></imagedata>
+                               format="PNG" srccredit="Chris Good"></imagedata>
                   </imageobject>
 
                   <textobject>
@@ -2956,7 +2956,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
           </listitem>
 
           <listitem>
-            <para>Click the <guilabel> >> </guilabel> button to link the buy
+            <para>Click the <guilabel>>></guilabel> button to link the buy
             split with the highlighted lot. The split moves from the <guilabel>
             Splits free</guilabel> panel to the <guilabel>Splits in Lot
             </guilabel> panel.</para>
@@ -2973,7 +2973,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
           </listitem>
 
           <listitem>
-            <para>Click the <guilabel> >> </guilabel> button to link the sell
+            <para>Click the <guilabel>>></guilabel> button to link the sell
               split with the highlighted lot.</para>
           </listitem>
 
@@ -2996,7 +2996,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
                   </imageobject>
                   <imageobject role="fo">
                     <imagedata fileref="figures/investLots2_BeforeScrub1Lot.png"
-                               format="PNG" srccredit="Chris Good" ></imagedata>
+                               format="PNG" srccredit="Chris Good"></imagedata>
                   </imageobject>
 
                   <textobject>
@@ -3041,7 +3041,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
                   </imageobject>
                   <imageobject role="fo">
                     <imagedata fileref="figures/investLots2_RegAfterScrub1Lot.png"
-                               format="PNG" srccredit="Chris Good" ></imagedata>
+                               format="PNG" srccredit="Chris Good"></imagedata>
                   </imageobject>
 
                   <textobject>
@@ -3145,7 +3145,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
               </imageobject>
               <imageobject role="fo">
                 <imagedata fileref="figures/invest2Lots0RegB4Scrub.png"
-                           format="PNG" srccredit="Chris Good" ></imagedata>
+                           format="PNG" srccredit="Chris Good"></imagedata>
               </imageobject>
 
               <textobject>
@@ -3180,7 +3180,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
                   </imageobject>
                   <imageobject role="fo">
                     <imagedata fileref="figures/invest2Lots1B4Scrub.png"
-                               format="PNG" srccredit="Chris Good" ></imagedata>
+                               format="PNG" srccredit="Chris Good"></imagedata>
                   </imageobject>
 
                   <textobject>
@@ -3211,7 +3211,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
                   </imageobject>
                   <imageobject role="fo">
                     <imagedata fileref="figures/invest2Lots2LotsAftScrubAcct.png"
-                               format="PNG" srccredit="Chris Good" ></imagedata>
+                               format="PNG" srccredit="Chris Good"></imagedata>
                   </imageobject>
 
                   <textobject>
@@ -3253,7 +3253,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
                   </imageobject>
                   <imageobject role="fo">
                     <imagedata fileref="figures/invest2Lots3RegAftScrubAcct.png"
-                               format="PNG" srccredit="Chris Good" ></imagedata>
+                               format="PNG" srccredit="Chris Good"></imagedata>
                   </imageobject>
 
                   <textobject>
@@ -3307,7 +3307,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
               </imageobject>
               <imageobject role="fo">
                 <imagedata fileref="figures/investLotsSplitReg.png"
-                           format="PNG" srccredit="Chris Good" ></imagedata>
+                           format="PNG" srccredit="Chris Good"></imagedata>
               </imageobject>
 
               <textobject>
@@ -3334,7 +3334,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
               </imageobject>
               <imageobject role="fo">
                 <imagedata fileref="figures/investLotsSplitLot0.png"
-                           format="PNG" srccredit="Chris Good" ></imagedata>
+                           format="PNG" srccredit="Chris Good"></imagedata>
               </imageobject>
 
               <textobject>
@@ -3360,7 +3360,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
               </imageobject>
               <imageobject role="fo">
                 <imagedata fileref="figures/investLotsSplitLot1.png"
-                           format="PNG" srccredit="Chris Good" ></imagedata>
+                           format="PNG" srccredit="Chris Good"></imagedata>
               </imageobject>
 
               <textobject>
@@ -3427,7 +3427,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
                   </imageobject>
                   <imageobject role="fo">
                     <imagedata fileref="figures/investLots2_RegAfterScrub1Lot.png"
-                               format="PNG" srccredit="Chris Good" ></imagedata>
+                               format="PNG" srccredit="Chris Good"></imagedata>
                   </imageobject>
 
                   <textobject>
@@ -3496,7 +3496,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
           </imageobject>
           <imageobject role="fo">
             <imagedata fileref="figures/invest_dividendcash.png"
-                       format="PNG" srccredit="Daniel Dodson" ></imagedata>
+                       format="PNG" srccredit="Daniel Dodson"></imagedata>
           </imageobject>
 
           <textobject>
@@ -3654,7 +3654,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_split1.png"
-                       format="PNG" srccredit="Dave Herman" ></imagedata>
+                       format="PNG" srccredit="Dave Herman"></imagedata>
           </imageobject>
 
           <textobject>
@@ -3673,7 +3673,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_split2.png"
-                       format="PNG" srccredit="Dave Herman" ></imagedata>
+                       format="PNG" srccredit="Dave Herman"></imagedata>
           </imageobject>
 
           <textobject>
@@ -3727,7 +3727,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_split3.png"
-                       format="PNG" srccredit="Dave Herman" ></imagedata>
+                       format="PNG" srccredit="Dave Herman"></imagedata>
           </imageobject>
 
           <textobject>
@@ -3748,7 +3748,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_split4.png"
-                       format="PNG" srccredit="Dave Herman" ></imagedata>
+                       format="PNG" srccredit="Dave Herman"></imagedata>
           </imageobject>
 
           <textobject>
@@ -3768,7 +3768,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_simplesplit1.png"
-                       format="PNG" srccredit="Dave Herman" ></imagedata>
+                       format="PNG" srccredit="Dave Herman"></imagedata>
           </imageobject>
 
           <textobject>
@@ -3810,7 +3810,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_merge2.png"
-                       format="PNG" srccredit="Dave Herman" ></imagedata>
+                       format="PNG" srccredit="Dave Herman"></imagedata>
           </imageobject>
 
           <textobject>
@@ -3867,7 +3867,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_merge3.png"
-                       format="PNG" srccredit="Dave Herman" ></imagedata>
+                       format="PNG" srccredit="Dave Herman"></imagedata>
           </imageobject>
 
           <textobject>
@@ -3890,7 +3890,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-help/tool-lots.html
         <mediaobject>
           <imageobject>
             <imagedata fileref="figures/invest_stockmerge1.png"
-                       format="PNG" srccredit="Dave Herman" ></imagedata>
+                       format="PNG" srccredit="Dave Herman"></imagedata>
           </imageobject>
 
           <textobject>
diff --git a/help/C/Help_ch_GUIMenus.xml b/help/C/Help_ch_GUIMenus.xml
index 32f4425..95a3a2a 100644
--- a/help/C/Help_ch_GUIMenus.xml
+++ b/help/C/Help_ch_GUIMenus.xml
@@ -53,7 +53,7 @@
 
           <imageobject role="fo">
             <imagedata fileref="figures/Main-window-callouts.png" format="PNG"
-                       srccredit="Cristian Marchi" ></imagedata>
+                       srccredit="Cristian Marchi"></imagedata>
           </imageobject>
 
           <textobject>
@@ -147,7 +147,7 @@
 
           <imageobject role="fo">
             <imagedata fileref="figures/Help_AccountTree_Screen.png" format="PNG"
-                       srccredit="Cristian Marchi" ></imagedata>
+                       srccredit="Cristian Marchi"></imagedata>
           </imageobject>
 
           <textobject>
@@ -176,9 +176,9 @@
           <title>Account Tree - <guimenu>File</guimenu> Menu - Access to file, account operations and printing.</title>
 
           <tgroup align="left" cols="3">
-            <colspec colname="c1" ></colspec>
-            <colspec colname="c2" ></colspec>
-            <colspec colname="c3" ></colspec>
+            <colspec colname="c1"></colspec>
+            <colspec colname="c2"></colspec>
+            <colspec colname="c3"></colspec>
 
             <thead>
               <row>
@@ -394,7 +394,7 @@
                 <entry namest="c2">
                   <para><guisubmenu>Export Account T<accel>r</accel>ee to CSV</guisubmenu></para></entry>
 
-                <entry namest="c3" >
+                <entry namest="c3">
                   <para>Exports your account hierarchy to a delimited <acronym>CSV</acronym> file. Does not
                   export data.</para></entry>
               </row>
@@ -403,7 +403,7 @@
                 <entry namest="c2">
                   <para><guisubmenu>Export <accel>T</accel>ransactions to CSV</guisubmenu></para></entry>
 
-                <entry namest="c3" >
+                <entry namest="c3">
                   <para>Exports transactions to a delimited <acronym>CSV</acronym> file.</para></entry>
               </row>
 
@@ -411,7 +411,7 @@
                 <entry namest="c2">
                   <para><guisubmenu>Export A<accel>c</accel>tive Register to CSV...</guisubmenu></para></entry>
 
-                <entry namest="c3" >
+                <entry namest="c3">
                   <para>Export the active Register to a CSV file.</para></entry>
               </row>
 
@@ -419,7 +419,7 @@
                 <entry namest="c2">
                   <para><guisubmenu>Export <accel>A</accel>ccounts</guisubmenu></para></entry>
 
-                <entry namest="c3" >
+                <entry namest="c3">
                   <para>Exports your account hierarchy to a new &app;file. Does not
                   export data.</para></entry>
               </row>
@@ -656,8 +656,8 @@
           <title>Account Tree - <guimenu><accel>V</accel>iew</guimenu> Menu - Changes display window view.</title>
 
           <tgroup align="left" cols="2">
-            <colspec colname="c1" ></colspec>
-            <colspec colname="c2" ></colspec>
+            <colspec colname="c1"></colspec>
+            <colspec colname="c2"></colspec>
 
             <thead>
               <row>
@@ -724,9 +724,9 @@
           perform stock splits, transfer and reconcile transactions.</title>
 
           <tgroup align="left" cols="3">
-            <colspec colname="c1" ></colspec>
-            <colspec colname="c2" ></colspec>
-            <colspec colname="c3" ></colspec>
+            <colspec colname="c1"></colspec>
+            <colspec colname="c2"></colspec>
+            <colspec colname="c3"></colspec>
 
             <thead>
               <row>
@@ -996,9 +996,9 @@
           <title>Account Tree - <guimenu>Business</guimenu> Menu - Access small business features of &app;.</title>
 
           <tgroup align="left" cols="3">
-            <colspec colname="c1" ></colspec>
-            <colspec colname="c2" ></colspec>
-            <colspec colname="c3" ></colspec>
+            <colspec colname="c1"></colspec>
+            <colspec colname="c2"></colspec>
+            <colspec colname="c3"></colspec>
 
             <thead>
               <row>
@@ -1245,9 +1245,9 @@
           <title>Account Tree - <guimenu>Reports</guimenu> Menu -  Access &app; Reports and Charts.</title>
 
           <tgroup align="left" cols="3">
-            <colspec colname="c1" ></colspec>
-            <colspec colname="c2" ></colspec>
-            <colspec colname="c3" ></colspec>
+            <colspec colname="c1"></colspec>
+            <colspec colname="c2"></colspec>
+            <colspec colname="c3"></colspec>
 
             <thead>
               <row>
@@ -2041,7 +2041,7 @@
 
           <imageobject role="fo">
             <imagedata fileref="figures/Help_AccountReg_Screen.png" format="PNG"
-                       srccredit="Cristian Marchi" ></imagedata>
+                       srccredit="Cristian Marchi"></imagedata>
           </imageobject>
 
           <textobject>
@@ -2085,9 +2085,9 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-guide/chapter_txns.
             printing.</title>
 
             <tgroup align="left" cols="3">
-              <colspec colname="c1" ></colspec>
-              <colspec colname="c2" ></colspec>
-              <colspec colname="c3" ></colspec>
+              <colspec colname="c1"></colspec>
+              <colspec colname="c2"></colspec>
+              <colspec colname="c3"></colspec>
 
             <thead>
               <row>
@@ -2286,7 +2286,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-guide/chapter_txns.
               <row>
                 <entry namest="c2">
                   <para><guisubmenu>Export Accounts Tree to CSV</guisubmenu></para></entry>
-                <entry namest="c3" >
+                <entry namest="c3">
                   <para>Exports your account hierarchy to a delimited <acronym>CSV</acronym> file. Does not
                   export data.</para></entry>
               </row>
@@ -2294,14 +2294,14 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-guide/chapter_txns.
               <row>
                 <entry namest="c2">
                   <para><guisubmenu>Export Transactions to CSV</guisubmenu></para></entry>
-                <entry namest="c3" >
+                <entry namest="c3">
                   <para>Exports transactions to a delimited <acronym>CSV</acronym> file.</para></entry>
               </row>
 
               <row>
                 <entry namest="c2">
                   <para><guisubmenu>Export Accounts</guisubmenu></para></entry>
-                <entry namest="c3" >
+                <entry namest="c3">
                   <para>Exports your account hierarchy to a new &app;file. Does not
                   export data.</para></entry>
               </row>
@@ -2502,9 +2502,9 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-guide/chapter_txns.
             </title>
 
             <tgroup align="left" cols="3">
-              <colspec colname="c1" ></colspec>
-              <colspec colname="c2" ></colspec>
-              <colspec colname="c3" ></colspec>
+              <colspec colname="c1"></colspec>
+              <colspec colname="c2"></colspec>
+              <colspec colname="c3"></colspec>
 
               <thead>
                 <row>
@@ -2586,7 +2586,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-guide/chapter_txns.
             </row>
 
             <row>
-              <entry namest="c2" >
+              <entry namest="c2">
                 <para><guilabel>Standard Order</guilabel></para></entry>
 
               <entry namest="c3">
@@ -2594,90 +2594,90 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-guide/chapter_txns.
             </row>
 
             <row>
-              <entry namest="c2" >
+              <entry namest="c2">
                 <para><guilabel>Date</guilabel></para></entry>
 
-              <entry namest="c3" >
+              <entry namest="c3">
                 <para>Sort by date.</para></entry>
             </row>
 
             <row>
-              <entry namest="c2" >
+              <entry namest="c2">
                 <para><guilabel>Date of Entry</guilabel></para></entry>
 
-              <entry namest="c3" >
+              <entry namest="c3">
                 <para>Sort by date of entry.</para></entry>
             </row>
 
             <row>
-              <entry namest="c2" >
+              <entry namest="c2">
                 <para><guilabel>Statement Date</guilabel></para></entry>
 
-              <entry namest="c3" >
+              <entry namest="c3">
                 <para>Sort by the statement date (unreconciled items last).</para></entry>
             </row>
 
             <row>
-              <entry namest="c2" >
+              <entry namest="c2">
                 <para><guilabel>Number</guilabel></para></entry>
 
-              <entry namest="c3" >
+              <entry namest="c3">
                 <para>Sort by number.</para></entry>
             </row>
 
             <row>
-              <entry namest="c2" >
+              <entry namest="c2">
                 <para><guilabel>Amount</guilabel></para></entry>
 
-              <entry namest="c3" >
+              <entry namest="c3">
                 <para>Sort by amount.</para></entry>
             </row>
 
             <row>
-              <entry namest="c2" >
+              <entry namest="c2">
                 <para><guilabel>Memo</guilabel></para></entry>
 
-              <entry namest="c3" >
+              <entry namest="c3">
                 <para>Sort by memo.</para></entry>
             </row>
 
             <row>
-              <entry namest="c2" >
+              <entry namest="c2">
                 <para><guilabel>Description</guilabel></para></entry>
 
-              <entry namest="c3" >
+              <entry namest="c3">
                 <para>Sort by Description.</para></entry>
             </row>
 
             <row>
-              <entry namest="c2" >
+              <entry namest="c2">
                 <para><guilabel>Action</guilabel></para></entry>
 
-              <entry namest="c3" >
+              <entry namest="c3">
                 <para>Sort by action field.</para></entry>
             </row>
 
             <row>
-              <entry namest="c2" >
+              <entry namest="c2">
                 <para><guilabel>Notes</guilabel></para></entry>
 
-              <entry namest="c3" >
+              <entry namest="c3">
                 <para>Sort by notes field.</para></entry>
             </row>
 
             <row>
-              <entry namest="c2" >
+              <entry namest="c2">
                 <para><guilabel>Reverse Order</guilabel></para></entry>
 
-              <entry namest="c3" >
+              <entry namest="c3">
                 <para>Reverse the sort order.</para></entry>
             </row>
             
             <row>
-              <entry namest="c2" >
+              <entry namest="c2">
                 <para><guilabel>Save Sort Order</guilabel></para></entry>
 
-              <entry namest="c3" >
+              <entry namest="c3">
                 <para>Save the sort order between sessions.</para></entry>
             </row>
 
@@ -2718,8 +2718,8 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-guide/chapter_txns.
             <title>Account Register - <guimenu>Transaction</guimenu> Menu - access to transaction tools.</title>
 
             <tgroup align="left" cols="2">
-              <colspec colname="c1" ></colspec>
-              <colspec colname="c2" ></colspec>
+              <colspec colname="c1"></colspec>
+              <colspec colname="c2"></colspec>
 
               <thead>
                 <row>
@@ -2801,9 +2801,9 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-guide/chapter_txns.
             transactions.</title>
 
             <tgroup align="left" cols="3">
-              <colspec colname="c1" ></colspec>
-              <colspec colname="c2" ></colspec>
-              <colspec colname="c3" ></colspec>
+              <colspec colname="c1"></colspec>
+              <colspec colname="c2"></colspec>
+              <colspec colname="c3"></colspec>
 
               <thead>
                 <row>
@@ -3307,7 +3307,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-guide/chapter_txns.
 
           <imageobject role="fo">
             <imagedata fileref="figures/Help_Report_Screen.png" format="PNG"
-                       srccredit="Cristian Marchi" ></imagedata>
+                       srccredit="Cristian Marchi"></imagedata>
           </imageobject>
 
           <textobject>
@@ -3343,9 +3343,9 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-guide/chapter_txns.
             printing.</title>
 
             <tgroup align="left" cols="3">
-              <colspec colname="c1" ></colspec>
-              <colspec colname="c2" ></colspec>
-              <colspec colname="c3" ></colspec>
+              <colspec colname="c1"></colspec>
+              <colspec colname="c2"></colspec>
+              <colspec colname="c3"></colspec>
 
             <thead>
               <row>
@@ -3579,7 +3579,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-guide/chapter_txns.
                 <entry namest="c2">
                   <para><guisubmenu>Export Accounts Tree to CSV</guisubmenu></para></entry>
 
-                <entry namest="c3" >
+                <entry namest="c3">
                   <para>Exports your account hierarchy to a delimited <acronym>CSV</acronym> file. Does not
                   export data.</para></entry>
               </row>
@@ -3588,7 +3588,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-guide/chapter_txns.
                 <entry namest="c2">
                   <para><guisubmenu>Export Transactions to CSV</guisubmenu></para></entry>
 
-                <entry namest="c3" >
+                <entry namest="c3">
                   <para>Exports transactions to a delimited <acronym>CSV</acronym> file.</para></entry>
               </row>
 
@@ -3596,7 +3596,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-guide/chapter_txns.
                 <entry namest="c2">
                   <para><guimenuitem>Export Report</guimenuitem></para></entry>
 
-                <entry namest="c3" >
+                <entry namest="c3">
                   <para>Export the current report in an <acronym>HTML</acronym> formatted file.</para></entry>
               </row>
 
@@ -3604,7 +3604,7 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-guide/chapter_txns.
                 <entry namest="c2">
                   <para><guisubmenu>Export Accounts</guisubmenu></para></entry>
 
-                <entry namest="c3" >
+                <entry namest="c3">
                   <para>Exports your account hierarchy to a new &app;file. Does not
                   export data.</para></entry>
               </row>
@@ -3803,9 +3803,9 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-guide/chapter_txns.
             <title>Reports - <guimenu>Actions</guimenu> Menu - Setup scheduled transactions.</title>
 
             <tgroup align="left" cols="3">
-              <colspec colname="c1" ></colspec>
-              <colspec colname="c2" ></colspec>
-              <colspec colname="c3" ></colspec>
+              <colspec colname="c1"></colspec>
+              <colspec colname="c2"></colspec>
+              <colspec colname="c3"></colspec>
 
               <thead>
                 <row>
@@ -3946,9 +3946,9 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-guide/chapter_txns.
           <title>Report - <guimenu>Reports</guimenu> Menu.</title>
 
           <tgroup align="left" cols="3">
-            <colspec colname="c1" ></colspec>
-            <colspec colname="c2" ></colspec>
-            <colspec colname="c3" ></colspec>
+            <colspec colname="c1"></colspec>
+            <colspec colname="c2"></colspec>
+            <colspec colname="c3"></colspec>
 
             <thead>
               <row>
@@ -4757,9 +4757,9 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-guide/chapter_txns.
           <table frame="topbot" id="budget-menus-actions-items">
             <title><guimenu>Actions</guimenu> Menu - Items in the standard menu that relate to budgets.</title>
           <tgroup align="left" cols="3">
-            <colspec colname="c1" ></colspec>
-            <colspec colname="c2" ></colspec>
-            <colspec colname="c3" ></colspec>
+            <colspec colname="c1"></colspec>
+            <colspec colname="c2"></colspec>
+            <colspec colname="c3"></colspec>
 
             <thead>
               <row>
@@ -4826,9 +4826,9 @@ url="https://www.gnucash.org/docs/v&series-stable;/C/gnucash-guide/chapter_txns.
             <title><guimenu>Reports</guimenu> Menu - Items in the standard menu that relate to budgets.</title>
 
           <tgroup align="left" cols="3">
-            <colspec colname="c1" ></colspec>
-            <colspec colname="c2" ></colspec>
-            <colspec colname="c3" ></colspec>
+            <colspec colname="c1"></colspec>
+            <colspec colname="c2"></colspec>
+            <colspec colname="c3"></colspec>
 
             <thead>
               <row>
diff --git a/help/C/Help_ch_Reports.xml b/help/C/Help_ch_Reports.xml
index 2b2d90a..64d6cd7 100644
--- a/help/C/Help_ch_Reports.xml
+++ b/help/C/Help_ch_Reports.xml
@@ -362,7 +362,7 @@
 
                  <imageobject role="fo">
                    <imagedata fileref="figures/Help_TxRptOpt_Screen.png" format="PNG"
-                     srccredit="Geert Janssens" ></imagedata>
+                     srccredit="Geert Janssens"></imagedata>
                  </imageobject>
 
                  <textobject><phrase>Transaction Report, Report Options screen</phrase>
diff --git a/help/C/Help_ch_Tools_Assistants.xml b/help/C/Help_ch_Tools_Assistants.xml
index 1c0267d..c5174ff 100644
--- a/help/C/Help_ch_Tools_Assistants.xml
+++ b/help/C/Help_ch_Tools_Assistants.xml
@@ -3290,7 +3290,7 @@
             </imageobject>
             <imageobject role="fo">
               <imagedata fileref="figures/Help_Tool_LotsStk.png"
-                         format="PNG" srccredit="Chris Good" ></imagedata>
+                         format="PNG" srccredit="Chris Good"></imagedata>
             </imageobject>
 
             <textobject>
@@ -3750,7 +3750,7 @@ url="&url-docs-build-C;guide/invest-sell1.html#invest-sellLots">
               </imageobject>
               <imageobject role="fo">
                 <imagedata fileref="figures/Help_Tool_LotsBus.png"
-                           format="PNG" srccredit="Chris Good" ></imagedata>
+                           format="PNG" srccredit="Chris Good"></imagedata>
               </imageobject>
 
               <textobject>
diff --git a/help/C/Help_ch_Transactions.xml b/help/C/Help_ch_Transactions.xml
index 50bbf1a..6937d54 100644
--- a/help/C/Help_ch_Transactions.xml
+++ b/help/C/Help_ch_Transactions.xml
@@ -1224,7 +1224,7 @@ Author:
                     <imagedata  fileref="figures/Help_CSV_Import_transactions_Preview.png" format="PNG" srccredit="David Cousens" width="515px"></imagedata>
                   </imageobject>
                   <imageobject role="fo">
-                    <imagedata  fileref="figures/Help_CSV_Import_transactions_Preview.png" format="PNG" srccredit="David Cousens" ></imagedata>
+                    <imagedata  fileref="figures/Help_CSV_Import_transactions_Preview.png" format="PNG" srccredit="David Cousens"></imagedata>
                   </imageobject>
                   <caption>The CSV Import Preview Pane with settings to import the shown data.</caption>
                 </mediaobject>
@@ -1575,9 +1575,9 @@ Author:
       </itemizedlist>
       <para>In addition to the checkboxes, the import status of each transaction is indicated by the background color of the transaction row. The checkbox state,
         background colors and their meaning are described in <xref linkend="match_status"/>.</para>
-      <table id="match_status" frame="all" >
+      <table id="match_status" frame="all">
         <title>Import Status of Transactions</title>
-        <tgroup cols="3" rowsep="1" >
+        <tgroup cols="3" rowsep="1">
           <colspec colwidth="1*+ 1cm" align="center" colsep="1" />
           <colspec colwidth="15*" align="left" colsep="1" />
           <colspec colwidth="26*" align="left" colsep="1" />
diff --git a/help/C/gnucash-help.xml b/help/C/gnucash-help.xml
index 72ff64b..ad25dc8 100644
--- a/help/C/gnucash-help.xml
+++ b/help/C/gnucash-help.xml
@@ -372,8 +372,7 @@
       <title>Feedback</title>
       <para>To report a bug or make a suggestion regarding this package or
         this manual, follow the directions at the
-        <ulink url="&url-bug-start;"
-          >&appname; Bug Tracking System</ulink>.
+        <ulink url="&url-bug-start;">&appname; Bug Tracking System</ulink>.
       </para>
 <!-- Translators may also add here feedback address for translations -->
     </legalnotice>
diff --git a/help/de/Help_ch_GettingStarted.xml b/help/de/Help_ch_GettingStarted.xml
index d5aa494..3c1cfd1 100644
--- a/help/de/Help_ch_GettingStarted.xml
+++ b/help/de/Help_ch_GettingStarted.xml
@@ -67,7 +67,7 @@
 
     </sect2>
 
-    <sect2 id="update-configuration-data" >
+    <sect2 id="update-configuration-data">
     <title><guilabel>Assistent zur Aktualisierung der &appname;-Voreinstellungen</guilabel> </title>
       <para>Der erster Bildschirm zur <guilabel>Aktualisierung der &appname; Konfiguration</guilabel>
         beschreibt den Assistenten. Während sich die Daten auf dem Schirm ändern werden, ändern sich
@@ -162,7 +162,7 @@
           <itemizedlist id="CreateAccounts">
 
             <listitem>
-              <para><guilabel>Neuen Kontenplan erstellen</guilabel> startet den entsprechenden
+              <para><guilabel><accel>N</accel>euen Kontenplan erstellen</guilabel> startet den entsprechenden
               Assistenten (siehe hierzu <xref linkend="acct-hierarchy"/>), der Sie durch
               diese Prozedur geleitet.
               </para>
@@ -172,7 +172,7 @@
               <para>Sind Sie bereits im Besitz von z.B. Quicken-Dateien
                 (<filename>.qif</filename>-Dateien) aus einem anderen Finanzprogramm
                 und möchten diese importieren, dann entscheiden Sie sich für
-                <guibutton>Import >> QIF-Datei importieren.</guibutton>
+                <guibutton>QIF-Dateien <accel>i</accel>mportieren</guibutton>
                 (siehe hierzu <xref linkend="import-qif"/>).
               </para>
             </listitem>
@@ -180,7 +180,7 @@
               <listitem>
              <para>Beschäftigen Sie sich das erste Mal mit GnuCash und wollen
               sich vorerst nur durch die Einstellungsmöglichkeiten von GnuCash
-              führen lassen, so ist <guibutton>Hilfe >> GnuCash-Kurs und Konzepte</guibutton>
+              führen lassen, so ist <guibutton>Die <accel>E</accel>inführung für neue Benutzer öffnen</guibutton>
               Ihre erste Wahl.
              </para>
             </listitem>
diff --git a/help/pt/Help_ch_GUIMenus.xml b/help/pt/Help_ch_GUIMenus.xml
index cb471cb..04dcebf 100644
--- a/help/pt/Help_ch_GUIMenus.xml
+++ b/help/pt/Help_ch_GUIMenus.xml
@@ -53,7 +53,7 @@
 
           <imageobject role="fo">
             <imagedata fileref="figures/Main-window-callouts.png" format="PNG"
-                       srccredit="Pedro Albuquerque" ></imagedata>
+                       srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -154,7 +154,7 @@
 
           <imageobject role="fo">
             <imagedata fileref="figures/Help_AccountTree_Screen.png" format="PNG"
-                       srccredit="Pedro Albuquerque" ></imagedata>
+                       srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -185,9 +185,9 @@
           ficheiros, operações de conta e impressão.</title>
 
           <tgroup align="left" cols="3">
-            <colspec colname="c1" ></colspec>
-            <colspec colname="c2" ></colspec>
-            <colspec colname="c3" ></colspec>
+            <colspec colname="c1"></colspec>
+            <colspec colname="c2"></colspec>
+            <colspec colname="c3"></colspec>
 
             <thead>
               <row>
@@ -407,7 +407,7 @@
                 <entry namest="c2">
                   <para><guisubmenu>Exportar contas para CSV</guisubmenu></para></entry>
 
-                <entry namest="c3" >
+                <entry namest="c3">
                   <para>Exporta a sua hierarquia de contas para um ficheiro delimitado <acronym>CSV</acronym>. 
                   Não exporta dados.</para></entry>
               </row>
@@ -416,7 +416,7 @@
                 <entry namest="c2">
                   <para><guisubmenu>Exportar transacções CSV</guisubmenu></para></entry>
 
-                <entry namest="c3" >
+                <entry namest="c3">
                   <para>Exporta transacções para um ficheiro delimitado <acronym>CSV</acronym>.</para></entry>
               </row>
 
@@ -424,7 +424,7 @@
                 <entry namest="c2">
                   <para><guisubmenu>Exportar contas</guisubmenu></para></entry>
 
-                <entry namest="c3" >
+                <entry namest="c3">
                   <para>Exporta a sua hierarquia de contas para um novo ficheiro do &app;. 
                   Não exporta dados.</para></entry>
               </row>
@@ -661,8 +661,8 @@
           <title>Árvore de contas - menu <guimenu>Ver</guimenu> - altera a vista da janela.</title>
 
           <tgroup align="left" cols="2">
-            <colspec colname="c1" ></colspec>
-            <colspec colname="c2" ></colspec>
+            <colspec colname="c1"></colspec>
+            <colspec colname="c2"></colspec>
 
             <thead>
               <row>
@@ -733,9 +733,9 @@
           transferir e reconciliar transacções.</title>
 
           <tgroup align="left" cols="3">
-            <colspec colname="c1" ></colspec>
-            <colspec colname="c2" ></colspec>
-            <colspec colname="c3" ></colspec>
+            <colspec colname="c1"></colspec>
+            <colspec colname="c2"></colspec>
+            <colspec colname="c3"></colspec>
 
             <thead>
               <row>
@@ -1012,9 +1012,9 @@
           do &app; para pequenos negócios.</title>
 
           <tgroup align="left" cols="3">
-            <colspec colname="c1" ></colspec>
-            <colspec colname="c2" ></colspec>
-            <colspec colname="c3" ></colspec>
+            <colspec colname="c1"></colspec>
+            <colspec colname="c2"></colspec>
+            <colspec colname="c3"></colspec>
 
             <thead>
               <row>
@@ -1264,9 +1264,9 @@
           aos relatórios e gráficos do &app;.</title>
 
           <tgroup align="left" cols="3">
-            <colspec colname="c1" ></colspec>
-            <colspec colname="c2" ></colspec>
-            <colspec colname="c3" ></colspec>
+            <colspec colname="c1"></colspec>
+            <colspec colname="c2"></colspec>
+            <colspec colname="c3"></colspec>
 
             <thead>
               <row>
@@ -2074,7 +2074,7 @@
 
           <imageobject role="fo">
             <imagedata fileref="figures/Help_AccountReg_Screen.png" format="PNG"
-                       srccredit="Pedro Albuquerque" ></imagedata>
+                       srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -2116,9 +2116,9 @@
             de ficheiro e contas e de impressão.</title>
 
             <tgroup align="left" cols="3">
-              <colspec colname="c1" ></colspec>
-              <colspec colname="c2" ></colspec>
-              <colspec colname="c3" ></colspec>
+              <colspec colname="c1"></colspec>
+              <colspec colname="c2"></colspec>
+              <colspec colname="c3"></colspec>
 
             <thead>
               <row>
@@ -2323,7 +2323,7 @@
                 <entry namest="c2">
                   <para><guisubmenu>Exportar contas para CSV</guisubmenu></para></entry>
 
-                <entry namest="c3" >
+                <entry namest="c3">
                   <para>Exporta a sua hierarquia de contas para um ficheiro delimitado <acronym>CSV</acronym>. 
                   Não exporta dados.</para></entry>
               </row>
@@ -2332,7 +2332,7 @@
                 <entry namest="c2">
                   <para><guisubmenu>Exportar transacções CSV</guisubmenu></para></entry>
 
-                <entry namest="c3" >
+                <entry namest="c3">
                   <para>Exporta transacções para um ficheiro delimitado <acronym>CSV</acronym>.</para></entry>
               </row>
 
@@ -2340,7 +2340,7 @@
                 <entry namest="c2">
                   <para><guisubmenu>Exportar contas</guisubmenu></para></entry>
 
-                <entry namest="c3" >
+                <entry namest="c3">
                   <para>Exporta a sua hierarquia de contas para um novo ficheiro do &app;. 
                   Não exporta dados.</para></entry>
               </row>
@@ -2527,9 +2527,9 @@
             </title>
 
             <tgroup align="left" cols="3">
-              <colspec colname="c1" ></colspec>
-              <colspec colname="c2" ></colspec>
-              <colspec colname="c3" ></colspec>
+              <colspec colname="c1"></colspec>
+              <colspec colname="c2"></colspec>
+              <colspec colname="c3"></colspec>
 
               <thead>
                 <row>
@@ -2602,7 +2602,7 @@
             </row>
 
             <row>
-              <entry namest="c2" >
+              <entry namest="c2">
                 <para><guilabel>Ordem padrão</guilabel></para></entry>
 
               <entry namest="c3">
@@ -2610,75 +2610,75 @@
             </row>
 
             <row>
-              <entry namest="c2" >
+              <entry namest="c2">
                 <para><guilabel>Data</guilabel></para></entry>
 
-              <entry namest="c3" >
+              <entry namest="c3">
                 <para>Ordenar por data</para></entry>
             </row>
 
             <row>
-              <entry namest="c2" >
+              <entry namest="c2">
                 <para><guilabel>Data de introdução</guilabel></para></entry>
 
-              <entry namest="c3" >
+              <entry namest="c3">
                 <para>Ordenar por data de introdução.</para></entry>
             </row>
 
             <row>
-              <entry namest="c2" >
+              <entry namest="c2">
                 <para><guilabel>Data de extrato</guilabel></para></entry>
 
-              <entry namest="c3" >
+              <entry namest="c3">
                 <para>Ordenar pela data do extrato (itens não reconciliados em 
                 último).</para></entry>
             </row>
 
             <row>
-              <entry namest="c2" >
+              <entry namest="c2">
                 <para><guilabel>Número</guilabel></para></entry>
 
-              <entry namest="c3" >
+              <entry namest="c3">
                 <para>Ordenar por número.</para></entry>
             </row>
 
             <row>
-              <entry namest="c2" >
+              <entry namest="c2">
                 <para><guilabel>Montante</guilabel></para></entry>
 
-              <entry namest="c3" >
+              <entry namest="c3">
                 <para>Ordenar por montante.</para></entry>
             </row>
 
             <row>
-              <entry namest="c2" >
+              <entry namest="c2">
                 <para><guilabel>Memorando</guilabel></para></entry>
 
-              <entry namest="c3" >
+              <entry namest="c3">
                 <para>Ordenar por memorando.</para></entry>
             </row>
 
             <row>
-              <entry namest="c2" >
+              <entry namest="c2">
                 <para><guilabel>Descrição</guilabel></para></entry>
 
-              <entry namest="c3" >
+              <entry namest="c3">
                 <para>Ordenar por descrição.</para></entry>
             </row>
 
             <row>
-              <entry namest="c2" >
+              <entry namest="c2">
                 <para><guilabel>Acção</guilabel></para></entry>
 
-              <entry namest="c3" >
+              <entry namest="c3">
                 <para>Ordenar pelo campo Acção.</para></entry>
             </row>
 
             <row>
-              <entry namest="c2" >
+              <entry namest="c2">
                 <para><guilabel>Notas</guilabel></para></entry>
 
-              <entry namest="c3" >
+              <entry namest="c3">
                 <para>Ordenar pelo campo Notas.</para></entry>
             </row>
 
@@ -2720,8 +2720,8 @@
             a ferramentas para transacções.</title>
 
             <tgroup align="left" cols="2">
-              <colspec colname="c1" ></colspec>
-              <colspec colname="c2" ></colspec>
+              <colspec colname="c1"></colspec>
+              <colspec colname="c2"></colspec>
 
               <thead>
                 <row>
@@ -2804,9 +2804,9 @@
             e reconciliar transacções.</title>
 
             <tgroup align="left" cols="3">
-              <colspec colname="c1" ></colspec>
-              <colspec colname="c2" ></colspec>
-              <colspec colname="c3" ></colspec>
+              <colspec colname="c1"></colspec>
+              <colspec colname="c2"></colspec>
+              <colspec colname="c3"></colspec>
 
               <thead>
                 <row>
@@ -3316,7 +3316,7 @@
 
           <imageobject role="fo">
             <imagedata fileref="figures/Help_Report_Screen.png" format="PNG"
-                       srccredit="Pedro Albuquerque" ></imagedata>
+                       srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
 
           <textobject>
@@ -3352,9 +3352,9 @@
             operações de ficheiros, contas e impressão.</title>
 
             <tgroup align="left" cols="3">
-              <colspec colname="c1" ></colspec>
-              <colspec colname="c2" ></colspec>
-              <colspec colname="c3" ></colspec>
+              <colspec colname="c1"></colspec>
+              <colspec colname="c2"></colspec>
+              <colspec colname="c3"></colspec>
 
             <thead>
               <row>
@@ -3609,7 +3609,7 @@
                 <entry namest="c2">
                   <para><guisubmenu>Exportar contas para CSV</guisubmenu></para></entry>
 
-                <entry namest="c3" >
+                <entry namest="c3">
                   <para>Exporta a sua hierarquia de contas para um ficheiro delimitado <acronym>CSV</acronym>. 
                   Não exporta dados.</para></entry>
               </row>
@@ -3618,7 +3618,7 @@
                 <entry namest="c2">
                   <para><guisubmenu>Exportar transacções CSV</guisubmenu></para></entry>
 
-                <entry namest="c3" >
+                <entry namest="c3">
                   <para>Exporta transacções para um ficheiro delimitado <acronym>CSV</acronym>.</para></entry>
               </row>
 
@@ -3626,7 +3626,7 @@
                 <entry namest="c2">
                   <para><guimenuitem>Exportar relatório</guimenuitem></para></entry>
 
-                <entry namest="c3" >
+                <entry namest="c3">
                   <para>Exporta o relatório actual para um ficheiro formatado como 
                   <acronym>HTML</acronym>.</para></entry>
               </row>
@@ -3635,7 +3635,7 @@
                 <entry namest="c2">
                   <para><guisubmenu>Exportar contas</guisubmenu></para></entry>
 
-                <entry namest="c3" >
+                <entry namest="c3">
                   <para>Exporta a sua hierarquia de contas para um novo ficheiro do &app;. 
                   Não exporta dados.</para></entry>
               </row>
@@ -3828,9 +3828,9 @@
             <title>Relatórios - menu <guimenu>Acções</guimenu> - configurar transacções agendadas.</title>
 
             <tgroup align="left" cols="3">
-              <colspec colname="c1" ></colspec>
-              <colspec colname="c2" ></colspec>
-              <colspec colname="c3" ></colspec>
+              <colspec colname="c1"></colspec>
+              <colspec colname="c2"></colspec>
+              <colspec colname="c3"></colspec>
 
               <thead>
                 <row>
@@ -4741,9 +4741,9 @@
             <title>Menu <guimenu>Acções</guimenu> - itens no menu padrão relacionados 
             com orçamentos.</title>
           <tgroup align="left" cols="3">
-            <colspec colname="c1" ></colspec>
-            <colspec colname="c2" ></colspec>
-            <colspec colname="c3" ></colspec>
+            <colspec colname="c1"></colspec>
+            <colspec colname="c2"></colspec>
+            <colspec colname="c3"></colspec>
 
             <thead>
               <row>
@@ -4813,9 +4813,9 @@
             relacionados com orçamentos.</title>
 
           <tgroup align="left" cols="3">
-            <colspec colname="c1" ></colspec>
-            <colspec colname="c2" ></colspec>
-            <colspec colname="c3" ></colspec>
+            <colspec colname="c1"></colspec>
+            <colspec colname="c2"></colspec>
+            <colspec colname="c3"></colspec>
 
             <thead>
               <row>
diff --git a/help/pt/Help_ch_Reports.xml b/help/pt/Help_ch_Reports.xml
index b026436..fd2f0da 100644
--- a/help/pt/Help_ch_Reports.xml
+++ b/help/pt/Help_ch_Reports.xml
@@ -102,7 +102,7 @@
 
                  <imageobject role="fo">
                    <imagedata fileref="figures/Help_TxRptOpt_Screen.png" format="PNG"
-                     srccredit="Pedro Albuquerque" ></imagedata>
+                     srccredit="Pedro Albuquerque"></imagedata>
                  </imageobject>
 
                  <textobject><phrase>Relatório de transacções — ecrã de opções</phrase>
diff --git a/help/pt/Help_ch_Transactions.xml b/help/pt/Help_ch_Transactions.xml
index add258b..cac056c 100644
--- a/help/pt/Help_ch_Transactions.xml
+++ b/help/pt/Help_ch_Transactions.xml
@@ -81,7 +81,7 @@ Translators:
 
           <imageobject role="fo">
             <imagedata fileref="figures/split_transaction.png" format="PNG"
-                       srccredit="Pedro Albuquerque" ></imagedata>
+                       srccredit="Pedro Albuquerque"></imagedata>
           </imageobject>
         </mediaobject> e o item de menu 
         <menuchoice><guimenu>Acções</guimenu><guimenuitem>Dividir transacção</guimenuitem></menuchoice> estão activos.</para>

commit 4b746b75634f6a1570952ab0399b695af376e80b
Author: Frank H. Ellenberger <frank.h.ellenberger at gmail.com>
Date:   Sun Apr 18 01:55:52 2021 +0200

    Add xmlformat incl. configuration

diff --git a/util/xmlformat/README b/util/xmlformat/README
new file mode 100644
index 0000000..bb244ef
--- /dev/null
+++ b/util/xmlformat/README
@@ -0,0 +1,20 @@
+A part of the xmlformat package from http://www.kitebird.com/software/xmlformat
+
+Motivation: most xml formatters like xmllint support only block layout. That is
+fine for data files, but Docbook has many elements which look inline nicer.
+
+Requirements: The installed part requires Perl.
+If you prefer Ruby, you can also install xmlformat.rb.
+
+To reformat an existing file run from the top source dir:
+util/xmlformat/xmlformat -f util/xmlformat/xmlformat.conf -i xml-file
+
+To reformat all files of the english guide:
+for i in guide/C/*.xml; do util/xmlformat/xmlformat.pl -f util/xmlformat/xmlformat.conf -i $i ; done
+
+There is also a {-b|--backup}[ suffix] option, but git reset HEAD is easier.
+
+After changes of the docbook version, verify all elements are recognized with
+--show-unconfigured-elements
+
+configure.ac and xmldocs.make are fragments from a former approach to define a make target.
\ No newline at end of file
diff --git a/util/xmlformat/configure.ac b/util/xmlformat/configure.ac
new file mode 100644
index 0000000..14d8631
--- /dev/null
+++ b/util/xmlformat/configure.ac
@@ -0,0 +1,7 @@
+
+dnl Same for xmlformat
+dnl currently only for perl version, improve for ruby version
+AC_PATH_PROGS(XMLFORMAT, [xmlformat.pl xmlformat.rb], [""])
+if test -z "$XMLFORMAT"; then
+  AC_MSG_WARN([xmlformat (.pl or .rb) - required for 'make format' - not found, perhaps you should install the xmlformat package or download it from http://www.kitebird.com/software/xmlformat?])
+fi
diff --git a/util/xmlformat/xmldocs.make b/util/xmlformat/xmldocs.make
new file mode 100644
index 0000000..54b1b88
--- /dev/null
+++ b/util/xmlformat/xmldocs.make
@@ -0,0 +1,13 @@
+# Todo: After testing replace the redirect '> xmlformat/$$basefile' by '--in-place --backup "~"'
+# Note: Clean required?
+
+if test -n "$XMLFORMAT"; then
+.PHONY: format
+format:
+	$(mkdir_p) "xmlformat";
+	for file in ${srcdir}/*.xml; do \
+	    basefile=`basename $$file`; \
+	   ${XMLFORMAT} --config-file $(top_srcdir)/xmlformat.conf ${srcdir}/$$basefile > xmlformat/$$basefile; \
+	done
+fi
+
diff --git a/util/xmlformat/xmlformat.conf b/util/xmlformat/xmlformat.conf
new file mode 100644
index 0000000..e543d18
--- /dev/null
+++ b/util/xmlformat/xmlformat.conf
@@ -0,0 +1,77 @@
+# xmlformat configuration for the docbook files of gnucash
+# created in 2019-11 by Frank H. Ellenberger
+#
+# Normal xml tags are in block format, but many docbook elements are inline easier to read.
+# They have ususally only one child element.
+# They have to be added at the end.
+#
+# The block elements are added so that 
+# 1. 'xmlformat.pl --show-unconfigured-elements' should be empty,
+# 2. we can be fine tune them.
+
+# our default values:
+*DEFAULT
+  format = block
+  entry-break = 1
+  element-break = 1
+  exit-break = 1
+  subindent = 2
+  normalize = yes
+  wrap-length = 100
+
+# the root element:
+*DOCUMENT
+  format = block
+  entry-break = 0
+  element-break = 1
+  exit-break = 1
+  subindent = 0
+
+# No processing:
+abbrev address literallayout programlisting screen synopsis
+  format = verbatim
+
+# Standard block elements:
+book part preface chapter appendix sect1 sect2 sect3 sect4 abstract bridgehead\
+bookinfo appendixinfo \
+glossary glossaryinfo glossdiv glossdef glossentry \
+itemizedlist orderedlist listitem variablelist varlistentry \
+table informaltable tgroup thead tbody row entry \
+example screenshot mediaobject inlinemediaobject imageobject textobject caption \
+qandaset qandadiv qandaentry question answer \
+blockquote caution important note tip warning \
+formalpara equation footnote \
+author authorgroup copyright legalnotice publisher releaseinfo revhistory revision revdescription \
+menuchoice keycombo  # because they are more complex
+  format = block
+
+# contain only blocks:
+figure revnumber  # Fixme: move revnumber into inline after fixing wrong content
+  element-break = 0
+
+# no entry break:
+para simpara subtitle
+  entry-break = 0
+
+# Meta: usually 1 line blocks:
+title publishername colspec revremark term xi:include
+  entry-break = 0
+  exit-break = 0
+  element-break = 1
+
+# Inline
+# For now order from docbook-tdg/html/ch02.html:
+abbrev acronym emphasis phrase quote trademark \
+anchor citation citerefentry citetitle firstterm glossterm \
+link olink ulink xref footnoteref glosssee glossseealso \
+mathphrase foreignphrase wordasword computeroutput literal markup prompt replaceable sgmltag userinput \
+inlineequation subscript superscript \
+accel guibutton guiicon guilabel guimenu guimenuitem guisubmenu keycap keysym mousebutton shortcut \
+action classname constant errorcode errorname errortype function interface interfacedefinition \
+literal msgtext property replaceable returnvalue structfield structname symbol token type varname \
+application code command envar filename medialabel msgtext option parameter prompt systemitem \
+database email hardware inlinegraphic optional \
+affiliation firstname honorific lineage othername surname \
+date edition holder pubdate revision year revnumber \
+imagedata 
+  format = inline
diff --git a/util/xmlformat/xmlformat.pl b/util/xmlformat/xmlformat.pl
new file mode 100755
index 0000000..877f5f1
--- /dev/null
+++ b/util/xmlformat/xmlformat.pl
@@ -0,0 +1,1745 @@
+#! /usr/bin/perl -w 
+# vim:set ts=2 sw=2 expandtab:
+
+# xmlformat - configurable XML file formatter/pretty-printer
+
+# Copyright (c) 2004, 2005 Kitebird, LLC.  All rights reserved.
+# Some portions are based on the REX shallow XML parser, which
+# is Copyright (c) 1998, Robert D. Cameron. These include the
+# regular expression parsing variables and the shallow_parse()
+# method.
+# This software is licensed as described in the file LICENSE,
+# which you should have received as part of this distribution.
+
+# Syntax: xmlformat [config-file] xml-file
+
+# Default config file is $ENV{XMLFORMAT_CONF} or ./xmlformat.conf, in that
+# order.
+
+# Paul DuBois
+# paul at kitebird.com
+# 2003-12-14
+
+# The input document first is parsed into a list of strings.  Each string
+# represents one of the following:
+# - text node
+# - processing instruction (the XML declaration is treated as a PI)
+# - comment
+# - CDATA section
+# - DOCTYPE declaration
+# - element tag (either <abc>, </abc>, or <abc/>), *including attributes*
+
+# Entities are left untouched. They appear in their original form as part
+# of the text node in which they occur.
+
+# The list of strings then is converted to a hierarchical structure.
+# The document top level is represented by a reference to a list.
+# Each list element is a reference to a node -- a hash that has "type"
+# and "content" key/value pairs. The "type" key indicates the node
+# type and has one of the following values:
+
+# "text"    - text node
+# "pi"      - processing instruction node
+# "comment" - comment node
+# "CDATA"   - CDATA section node
+# "DOCTYPE" - DOCTYPE node
+# "elt"     - element node
+
+# (For purposes of this program, it's really only necessary to have "text",
+# "elt", and "other".  The types other than "text" and "elt" currently are
+# all treated the same way.)
+
+# For all but element nodes, the "content" value is the text of the node.
+
+# For element nodes, the "content" hash is a reference to a list of
+# nodes for the element's children. In addition, an element node has
+# three additional key/value pairs:
+# - The "name" value is the tag name within the opening tag, minus angle
+#   brackets or attributes.
+# - The "open_tag" value is the full opening tag, which may also be the
+#   closing tag.
+# - The "close_tag" value depends on the opening tag.  If the open tag is
+#   "<abc>", the close tag is "</abc>". If the open tag is "<abc/>", the
+#   close tag is the empty string.
+
+# If the tree structure is converted back into a string with
+# tree_stringify(), the result can be compared to the input file
+# as a regression test. The string should be identical to the original
+# input document.
+
+use strict;
+
+use Getopt::Long;
+$Getopt::Long::ignorecase = 0; # options are case sensitive
+$Getopt::Long::bundling = 1;   # allow short options to be bundled
+
+my $PROG_NAME = "xmlformat";
+my $PROG_VERSION = "1.04";
+my $PROG_LANG = "Perl";
+
+# ----------------------------------------------------------------------
+
+package XMLFormat;
+
+use strict;
+
+# ----------------------------------------------------------------------
+
+# Regular expressions for parsing document components. Based on REX.
+
+# SPE = shallow parsing expression
+# SE = scanning expression
+# CE = completion expression
+# RSB = right square brackets
+# QM = question mark
+
+my $TextSE = "[^<]+";
+my $UntilHyphen = "[^-]*-";
+my $Until2Hyphens = "$UntilHyphen(?:[^-]$UntilHyphen)*-";
+my $CommentCE = "$Until2Hyphens>?";
+my $UntilRSBs = "[^\\]]*\\](?:[^\\]]+\\])*\\]+";
+my $CDATA_CE = "$UntilRSBs(?:[^\\]>]$UntilRSBs)*>";
+my $S = "[ \\n\\t\\r]+";
+my $NameStrt = "[A-Za-z_:]|[^\\x00-\\x7F]";
+my $NameChar = "[A-Za-z0-9_:.-]|[^\\x00-\\x7F]";
+my $Name = "(?:$NameStrt)(?:$NameChar)*";
+my $QuoteSE = "\"[^\"]*\"|'[^']*'";
+my $DT_IdentSE = "$S$Name(?:$S(?:$Name|$QuoteSE))*";
+my $MarkupDeclCE = "(?:[^\\]\"'><]+|$QuoteSE)*>";
+my $S1 = "[\\n\\r\\t ]";
+my $UntilQMs = "[^?]*\\?+";
+my $PI_Tail = "\\?>|$S1$UntilQMs(?:[^>?]$UntilQMs)*>";
+my $DT_ItemSE =
+"<(?:!(?:--$Until2Hyphens>|[^-]$MarkupDeclCE)|\\?$Name(?:$PI_Tail))|%$Name;|$S";
+my $DocTypeCE = "$DT_IdentSE(?:$S)?(?:\\[(?:$DT_ItemSE)*\\](?:$S)?)?>?";
+my $DeclCE =
+"--(?:$CommentCE)?|\\[CDATA\\[(?:$CDATA_CE)?|DOCTYPE(?:$DocTypeCE)?";
+my $PI_CE = "$Name(?:$PI_Tail)?";
+my $EndTagCE = "$Name(?:$S)?>?";
+my $AttValSE = "\"[^<\"]*\"|'[^<']*'";
+my $ElemTagCE = "$Name(?:$S$Name(?:$S)?=(?:$S)?(?:$AttValSE))*(?:$S)?/?>?";
+my $MarkupSPE =
+"<(?:!(?:$DeclCE)?|\\?(?:$PI_CE)?|/(?:$EndTagCE)?|(?:$ElemTagCE)?)";
+my $XML_SPE = "$TextSE|$MarkupSPE";
+
+# ----------------------------------------------------------------------
+
+# Allowable options and their possible values:
+# - The keys of this hash are the allowable option names
+# - The value for each key is list of allowable option values
+# - If the value is undef, the option value must be numeric
+# If any new formatting option is added to this program, it
+# must be specified here, *and* a default value for it should
+# be listed in the *DOCUMENT and *DEFAULT pseudo-element
+# option hashes.
+
+my %opt_list = (
+  "format"    => [ "block", "inline", "verbatim" ],
+  "normalize"   => [ "yes", "no" ],
+  "subindent"   => undef,
+  "wrap-length" => undef,
+  "entry-break" => undef,
+  "exit-break"  => undef,
+  "element-break" => undef
+);
+
+# Object creation: set up the default formatting configuration
+# and variables for maintaining input and output document.
+
+sub new
+{
+my $type = shift;
+
+  my $self = {};
+
+  # Formatting options for each element.
+
+  $self->{elt_opts} = { };
+
+  # The formatting options for the *DOCUMENT and *DEFAULT pseudo-elements can
+  # be overridden in the configuration file, but the options must also be
+  # built in to make sure they exist if not specified in the configuration
+  # file.  Each of the structures must have a value for every option.
+
+  # Options for top-level document children.
+  # - Do not change entry-break: 0 ensures no extra newlines before
+  #   first element of output.
+  # - Do not change exit-break: 1 ensures a newline after final element
+  #   of output document.
+  # - It's probably best not to change any of the others, except perhaps
+  #   if you want to increase the element-break.
+
+  $self->{elt_opts}->{"*DOCUMENT"} = {
+    "format"    => "block",
+    "normalize"   => "no",
+    "subindent"   => 0,
+    "wrap-length" => 0,
+    "entry-break" => 0, # do not change
+    "exit-break"  => 1, # do not change
+    "element-break" => 1
+  };
+
+  # Default options. These are used for any elements in the document
+  # that are not specified explicitly in the configuration file.
+
+  $self->{elt_opts}->{"*DEFAULT"} = {
+    "format"    => "block",
+    "normalize"   => "no",
+    "subindent"   => 1,
+    "wrap-length" => 0,
+    "entry-break" => 1,
+    "exit-break"  => 1,
+    "element-break" => 1
+  };
+
+  # Run the *DOCUMENT and *DEFAULT options through the option-checker
+  # to verify that the built-in values are legal.
+
+  my $err_count = 0;
+
+  foreach my $elt_name (keys (%{$self->{elt_opts}}))  # ... for each element
+  {
+    # Check each option for element
+    while (my ($opt_name, $opt_val) = each (%{$self->{elt_opts}->{$elt_name}}))
+    {
+      my $err_msg;
+
+      ($opt_val, $err_msg) = check_option ($opt_name, $opt_val);
+      if (!defined ($err_msg))
+      {
+        $self->{elt_opts}->{$elt_name}->{$opt_name} = $opt_val;
+      }
+      else
+      {
+        warn "LOGIC ERROR: $elt_name default option is invalid\n";
+        warn "$err_msg\n";
+        ++$err_count;
+      }
+    }
+  }
+
+  # Make sure that the every option is represented in the
+  # *DOCUMENT and *DEFAULT structures.
+
+  foreach my $opt_name (keys (%opt_list))
+  {
+    foreach my $elt_name (keys (%{$self->{elt_opts}}))
+    {
+      if (!exists ($self->{elt_opts}->{$elt_name}->{$opt_name}))
+      {
+        warn "LOGIC ERROR: $elt_name has no default '$opt_name' option\n";
+        ++$err_count;
+      }
+    }
+  }
+
+  die "Cannot continue; internal default formatting options must be fixed\n"
+    if $err_count > 0;
+
+  bless $self, $type;    # bless object and return it
+}
+
+# Initialize the variables that are used per-document
+
+sub init_doc_vars
+{
+my $self = shift;
+
+  # Elements that are used in the document but not named explicitly
+  # in the configuration file.
+
+  $self->{unconf_elts} = { };
+
+  # List of tokens for current document.
+
+  $self->{tokens} = [ ];
+
+  # List of line numbers for each token
+
+  $self->{line_num} = [ ];
+
+  # Document node tree (constructed from the token list).
+
+  $self->{tree} = [ ];
+
+  # Variables for formatting operations:
+  # out_doc = resulting output document (constructed from document tree)
+  # pending = array of pending tokens being held until flushed
+
+  $self->{out_doc} = "";
+  $self->{pending} = [ ];
+
+  # Inline elements within block elements are processed using the
+  # text normalization (and possible line-wrapping) values of their
+  # enclosing block. Blocks and inlines may be nested, so we maintain
+  # a stack that allows the normalize/wrap-length values of the current
+  # block to be determined.
+
+  $self->{block_name_stack} = [ ];  # for debugging
+  $self->{block_opts_stack} = [ ];
+
+  # A similar stack for maintaining each block's current break type.
+
+  $self->{block_break_type_stack} = [ ];
+}
+
+# Accessors for token list and resulting output document
+
+sub tokens
+{
+my $self = shift;
+
+  return $self->{tokens};
+}
+
+sub out_doc
+{
+my $self = shift;
+
+  return $self->{out_doc};
+}
+
+
+# Methods for adding strings to output document or
+# to the pending output array
+
+sub add_to_doc
+{
+my ($self, $str) = @_;
+
+  $self->{out_doc} .= $str;
+}
+
+sub add_to_pending
+{
+my ($self, $str) = @_;
+
+  push (@{$self->{pending}}, $str);
+}
+
+
+# Block stack mainenance methods
+
+# Push options onto or pop options off from the stack.  When doing
+# this, also push or pop an element onto the break-level stack.
+
+sub begin_block
+{
+my ($self, $name, $opts) = @_;
+
+  push (@{$self->{block_name_stack}}, $name);
+  push (@{$self->{block_opts_stack}}, $opts);
+  push (@{$self->{block_break_type_stack}}, "entry-break");
+}
+
+sub end_block
+{
+my $self = shift;
+
+  pop (@{$self->{block_name_stack}});
+  pop (@{$self->{block_opts_stack}});
+  pop (@{$self->{block_break_type_stack}});
+}
+
+# Return the current block's normalization status or wrap length
+
+sub block_normalize
+{
+my $self = shift;
+
+  my $size = @{$self->{block_opts_stack}};
+  my $opts = $self->{block_opts_stack}->[$size-1];
+  return $opts->{normalize} eq "yes";
+}
+
+sub block_wrap_length
+{
+my $self = shift;
+
+  my $size = @{$self->{block_opts_stack}};
+  my $opts = $self->{block_opts_stack}->[$size-1];
+  return $opts->{"wrap-length"};
+}
+
+# Set the current block's break type, or return the number of newlines
+# for the block's break type
+
+sub set_block_break_type
+{
+my ($self, $type) = @_;
+
+  my $size = @{$self->{block_break_type_stack}};
+  $self->{block_break_type_stack}->[$size-1] = $type;
+}
+
+sub block_break_value
+{
+my $self = shift;
+
+  my $size = @{$self->{block_opts_stack}};
+  my $opts = $self->{block_opts_stack}->[$size-1];
+  $size = @{$self->{block_break_type_stack}};
+  my $type = $self->{block_break_type_stack}->[$size-1];
+  return $opts->{$type};
+}
+
+
+# ----------------------------------------------------------------------
+
+# Read configuration information.  For each element, construct a hash
+# containing a hash key and value for each option name and value.
+# After reading the file, fill in missing option values for
+# incomplete option structures using the *DEFAULT options.
+
+sub read_config
+{
+my $self = shift;
+my $conf_file = shift;
+my @elt_names = ();
+my $err_msg;
+my $in_continuation = 0;
+my $saved_line = "";
+
+  open (FH, $conf_file) or die "Cannot read config file $conf_file: $!\n";
+  while (<FH>)
+  {
+    chomp;
+
+    next if /^\s*($|#)/;  # skip blank lines, comments
+    if ($in_continuation)
+    {
+      $_ = $saved_line . " " . $_;
+      $saved_line = "";
+      $in_continuation = 0;
+    }
+    if (!/^\s/)
+    {
+      # Line doesn't begin with whitespace, so it lists element names.
+      # Names are separated by whitespace or commas, possibly followed
+      # by a continuation character or a comment.
+      if (/\\$/)
+      {
+        s/\\$//;                          # remove continuation character
+        $saved_line = $_;
+        $in_continuation = 1;
+        next;
+      }
+      s/\s*#.*$//;                        # remove any trailing comment
+      @elt_names = split (/[\s,]+/, $_);
+      # make sure each name has an entry in the elt_opts structure
+      foreach my $elt_name (@elt_names)
+      {
+        $self->{elt_opts}->{$elt_name} = { }
+          unless exists ($self->{elt_opts}->{$elt_name});
+      }
+    }
+    else
+    {
+      # Line begins with whitespace, so it contains an option
+      # to apply to the current element list, possibly followed by
+      # a comment.  First check that there is a current list.
+      # Then parse the option name/value.
+
+      die "$conf_file:$.: Option setting found before any "
+          . "elements were named.\n"
+        if !@elt_names;
+      s/\s*#.*$//;
+      my ($opt_name, $opt_val) = /^\s+(\S+)(?:\s+|\s*=\s*)(\S+)$/;
+      die "$conf_file:$.: Malformed line: $_\n" unless defined ($opt_val);
+
+      # Check option. If illegal, die with message. Otherwise,
+      # add option to each element in current element list
+
+      ($opt_val, $err_msg) = check_option ($opt_name, $opt_val);
+      die "$conf_file:$.: $err_msg\n" if defined ($err_msg);
+      foreach my $elt_name (@elt_names)
+      {
+        $self->{elt_opts}->{$elt_name}->{$opt_name} = $opt_val;
+      }
+    }
+  }
+  close (FH);
+
+  # For any element that has missing option values, fill in the values
+  # using the options for the *DEFAULT pseudo-element.  This speeds up
+  # element option lookups later.  It also makes it unnecessary to test
+  # each option to see if it's defined: All element option structures
+  # will have every option defined.
+
+  my $def_opts = $self->{elt_opts}->{"*DEFAULT"};
+
+  foreach my $elt_name (keys (%{$self->{elt_opts}}))
+  {
+    next if $elt_name eq "*DEFAULT";
+    foreach my $opt_name (keys (%{$def_opts}))
+    {
+      next if exists ($self->{elt_opts}->{$elt_name}->{$opt_name}); # already set
+      $self->{elt_opts}->{$elt_name}->{$opt_name} = $def_opts->{$opt_name};
+    }
+  }
+}
+
+
+# Check option name to make sure it's legal. Check the value to make sure
+# that it's legal for the name.  Return a two-element array:
+# (value, undef) if the option name and value are legal.
+# (undef, message) if an error was found; message contains error message.
+# For legal values, the returned value should be assigned to the option,
+# because it may get type-converted here.
+
+sub check_option
+{
+my ($opt_name, $opt_val) = @_;
+
+  # - Check option name to make sure it's a legal option
+  # - Then check the value.  If there is a list of values
+  #   the value must be one of them.  Otherwise, the value
+  #   must be an integer.
+
+  return (undef, "Unknown option name: $opt_name")
+    unless exists ($opt_list{$opt_name});
+  my $allowable_val = $opt_list{$opt_name};
+  if (defined ($allowable_val))
+  {
+    return (undef, "Unknown '$opt_name' value: $opt_val")
+      unless grep (/^$opt_val$/, @{$allowable_val});
+  }
+  else  # other options should be numeric
+  {
+    # "$opt_val" converts $opt_val to string for pattern match
+    return (undef, "'$opt_name' value ($opt_val) should be an integer")
+      unless "$opt_val" =~ /^\d+$/;
+  }
+  return ($opt_val, undef);
+}
+
+
+# Return hash of option values for a given element.  If no options are found:
+# - Add the element name to the list of unconfigured options.
+# - Assign the default options to the element.  (This way the test for the
+#   option fails only once.)
+
+sub get_opts
+{
+my $self = shift;
+my $elt_name = shift;
+
+  my $opts = $self->{elt_opts}->{$elt_name};
+  if (!defined ($opts))
+  {
+    $self->{unconf_elts}->{$elt_name} = 1;
+    $opts = $self->{elt_opts}->{$elt_name} = $self->{elt_opts}->{"*DEFAULT"};
+  }
+  return $opts;
+}
+
+
+# Display contents of configuration options to be used to process document.
+# For each element named in the elt_opts structure, display its format
+# type, and those options that apply to the type.
+
+sub display_config
+{
+my $self = shift;
+# Format types and the additional options that apply to each type
+my $format_opts = {
+  "block" => [
+              "entry-break",
+              "element-break",
+              "exit-break",
+              "subindent",
+              "normalize",
+              "wrap-length"
+              ],
+  "inline" => [ ],
+  "verbatim" => [ ]
+};
+
+  foreach my $elt_name (sort (keys (%{$self->{elt_opts}})))
+  {
+    print "$elt_name\n";
+    my %opts = %{$self->{elt_opts}->{$elt_name}};
+    my $format = $opts{format};
+    # Write out format type, then options that apply to the format type
+    print "  format = $format\n";
+    foreach my $opt_name (@{$format_opts->{$format}})
+    {
+      print "  $opt_name = $opts{$opt_name}\n";
+    }
+    print "\n";
+  }
+}
+
+
+# Display the list of elements that are used in the document but not
+# configured in the configuration file.
+
+# Then re-unconfigure the elements so that they won't be considered
+# as configured for the next document, if there is one.
+
+sub display_unconfigured_elements
+{
+my $self = shift;
+
+  my @elts = keys (%{$self->{unconf_elts}});
+  if (@elts == 0)
+  {
+    print "The document contains no unconfigured elements.\n";
+  }
+  else
+  {
+    print "The following document elements were assigned no formatting options:\n";
+    foreach my $line ($self->line_wrap ([ join (" ", sort (@elts)) ], 0, 0, 65))
+    {
+      print "$line\n";
+    }
+  }
+
+  foreach my $elt_name (@elts)
+  {
+    delete ($self->{elt_opts}->{$elt_name});
+  }
+}
+
+# ----------------------------------------------------------------------
+
+# Main document processing routine.
+# - Argument is a string representing an input document
+# - Return value is the reformatted document, or undef. An undef return
+#   signifies either that an error occurred, or that some option was
+#   given that suppresses document output. In either case, don't write
+#   any output for the document.  Any error messages will already have
+#   been printed when this returns.
+
+sub process_doc
+{
+my $self = shift;
+my ($doc, $verbose, $check_parser, $canonize_only, $show_unconf_elts) = @_;
+my $str;
+
+  $self->init_doc_vars ();
+
+  # Perform lexical parse to split document into list of tokens
+  warn "Parsing document...\n" if $verbose;
+  $self->shallow_parse ($doc);
+
+  if ($check_parser)
+  {
+    warn "Checking parser...\n" if $verbose;
+    # concatentation of tokens should be identical to original document
+    if ($doc eq join ("", @{$self->tokens ()}))
+    {
+      print "Parser is okay\n";
+    }
+    else
+    {
+      print "PARSER ERROR: document token concatenation differs from document\n";
+    }
+    return undef;
+  }
+
+  # Assign input line number to each token
+  $self->assign_line_numbers ();
+
+  # Look for and report any error tokens returned by parser
+  warn "Checking document for errors...\n" if $verbose;
+  if ($self->report_errors () > 0)
+  {
+    warn "Cannot continue processing document.\n";
+    return undef;
+  }
+
+  # Convert the token list to a tree structure
+  warn "Converting document tokens to tree...\n" if $verbose;
+  if ($self->tokens_to_tree () > 0)
+  {
+    warn "Cannot continue processing document.\n";
+    return undef;
+  }
+
+  # Check: Stringify the tree to convert it back to a single string,
+  # then compare to original document string (should be identical)
+  # (This is an integrity check on the validity of the to-tree and stringify
+  # operations; if one or both do not work properly, a mismatch should occur.)
+  #$str = $self->tree_stringify ();
+  #print $str;
+  #warn "ERROR: mismatch between document and resulting string\n" if $doc ne $str;
+
+  # Canonize tree to remove extraneous whitespace
+  warn "Canonizing document tree...\n" if $verbose;
+  $self->tree_canonize ();
+
+  if ($canonize_only)
+  {
+    print $self->tree_stringify () . "\n";
+    return undef;
+  }
+
+  # One side-effect of canonizing the tree is that the formatting
+  # options are looked up for each element in the document.  That
+  # causes the list of elements that have no explicit configuration
+  # to be built.  Display the list and return if user requested it.
+
+  if ($show_unconf_elts)
+  {
+    $self->display_unconfigured_elements ();
+    return undef;
+  }
+
+  # Format the tree to produce formatted XML as a single string
+  warn "Formatting document tree...\n" if $verbose;
+  $self->tree_format ();
+
+  # If the document is not empty, add a newline and emit a warning if
+  # reformatting failed to add a trailing newline.  This shouldn't
+  # happen if the *DOCUMENT options are set up with exit-break = 1,
+  # which is the reason for the warning rather than just silently
+  # adding the newline.
+
+  $str = $self->out_doc ();
+  if ($str ne "" && $str !~ /\n$/)
+  {
+    warn "LOGIC ERROR: trailing newline had to be added\n";
+    $str .= "\n";
+  }
+
+  return $str;
+}
+
+# ----------------------------------------------------------------------
+
+# Parse XML document into array of tokens and store array
+
+sub shallow_parse
+{ 
+my ($self, $xml_document) = @_;
+
+  $self->{tokens} = [ $xml_document =~ /$XML_SPE/g ];
+}
+
+# ----------------------------------------------------------------------
+
+# Extract a tag name from a tag and return it.
+
+# Dies if the tag cannot be found, because this is supposed to be
+# called only with a legal tag.
+
+sub extract_tag_name
+{
+my $tag = shift;
+
+  die "Cannot find tag name in tag: $tag\n" unless $tag =~ /^<\/?($Name)/;
+  return $1;
+}
+
+# ----------------------------------------------------------------------
+
+# Assign an input line number to each token.  The number indicates
+# the line number on which the token begins.
+
+sub assign_line_numbers
+{
+my $self = shift;
+my $line_num = 1;
+
+  $self->{line_num} = [ ];
+  for (my $i = 0; $i < @{$self->{tokens}}; $i++)
+  {
+    my $token = $self->{tokens}->[$i];
+    push (@{$self->{line_num}}, $line_num);
+    # count newlines and increment line counter (tr returns no. of matches)
+    $line_num += ($token =~ tr/\n/\n/);
+  }
+}
+
+# ----------------------------------------------------------------------
+
+# Check token list for errors and report any that are found. Error
+# tokens are those that begin with "<" but do not end with ">".
+
+# Returns the error count.
+
+# Does not modify the original token list.
+
+sub report_errors
+{
+my $self = shift;
+my $err_count = 0;
+
+  for (my $i = 0; $i < @{$self->{tokens}}; $i++)
+  {
+    my $token = $self->{tokens}->[$i];
+    if ($token =~ /^</ && $token !~ />$/)
+    {
+      my $line_num = $self->{line_num}->[$i];
+      warn "Malformed token at line $line_num, token " . ($i+1) . ": $token\n";
+      ++$err_count;
+    }
+  }
+  warn "Number of errors found: $err_count\n" if $err_count > 0;
+  return $err_count;
+}
+
+# ----------------------------------------------------------------------
+
+# Helper routine to print tag stack for tokens_to_tree
+
+sub print_tag_stack
+{
+my ($label, @stack) = @_;
+  if (@stack < 1)
+  {
+    warn "  $label: none\n";
+  }
+  else
+  {
+    warn "  $label:\n";
+    for (my $i = 0; $i < @stack; $i++)
+    {
+      warn "  ", ($i+1), ": ", $stack[$i], "\n";
+    }
+  }
+}
+
+# Convert the list of XML document tokens to a tree representation.
+# The implementation uses a loop and a stack rather than recursion.
+
+# Does not modify the original token list.
+
+# Returns an error count.
+
+sub tokens_to_tree
+{
+my $self = shift;
+
+  my @tag_stack = ();     # stack for element tags
+  my @children_stack = ();  # stack for lists of children
+  my $children = [ ];     # current list of children
+  my $err_count = 0;
+
+  for (my $i = 0; $i < @{$self->{tokens}}; $i++)
+  {
+    my $token = $self->{tokens}->[$i];
+    my $line_num = $self->{line_num}->[$i];
+    my $tok_err = "Error near line $line_num, token " . ($i+1) . " ($token)";
+    if ($token !~ /^</)           # text
+    {
+      push (@{$children}, text_node ($token));
+    }
+    elsif ($token =~ /^<!--/)       # comment
+    {
+      push (@{$children}, comment_node ($token));
+    }
+    elsif ($token =~ /^<\?/)        # processing instruction
+    {
+      push (@{$children}, pi_node ($token));
+    }
+    elsif ($token =~ /^<!DOCTYPE/)      # DOCTYPE
+    {
+      push (@{$children}, doctype_node ($token));
+    }
+    elsif ($token =~ /^<!\[/)       # CDATA
+    {
+      push (@{$children}, cdata_node ($token));
+    }
+    elsif ($token =~ /^<\//)        # element close tag
+    {
+      if (!@tag_stack)
+      {
+        warn "$tok_err: Close tag w/o preceding open tag; malformed document?\n";
+        ++$err_count;
+        next;
+      }
+      if (!@children_stack)
+      {
+        warn "$tok_err: Empty children stack; malformed document?\n";
+        ++$err_count;
+        next;
+      }
+      my $tag = pop (@tag_stack);
+      my $open_tag_name = extract_tag_name ($tag);
+      my $close_tag_name = extract_tag_name ($token);
+      if ($open_tag_name ne $close_tag_name)
+      {
+        warn "$tok_err: Tag mismatch; malformed document?\n";
+        warn "  open tag: $tag\n";
+        warn "  close tag: $token\n";
+        print_tag_stack ("enclosing tags", @tag_stack);
+        ++$err_count;
+        next;
+      }
+      my $elt = element_node ($tag, $token, $children);
+      $children = pop (@children_stack);
+      push (@{$children}, $elt);
+    }
+    else                  # element open tag
+    {
+      # If we reach here, we're seeing the open tag for an element:
+      # - If the tag is also the close tag (e.g., <abc/>), close the
+      #   element immediately, giving it an empty child list.
+      # - Otherwise, push tag and child list on stacks, begin new child
+      #   list for element body.
+      if ($token =~ /\/>$/)     # tag is of form <abc/>
+      {
+        push (@{$children}, element_node ($token, "", [ ]));
+      }
+      else              # tag is of form <abc>
+      {
+        push (@tag_stack, $token);
+        push (@children_stack, $children);
+        $children = [ ];
+      }
+    }
+  }
+
+  # At this point, the stacks should be empty if the document is
+  # well-formed.
+
+  if (@tag_stack)
+  {
+    warn "Error at EOF: Unclosed tags; malformed document?\n";
+    print_tag_stack ("unclosed tags", @tag_stack);
+    ++$err_count;
+  }
+  if (@children_stack)
+  {
+    warn "Error at EOF: Unprocessed child elements; malformed document?\n";
+# TODO: print out info about them
+    ++$err_count;
+  }
+
+  $self->{tree} = $children;
+  return $err_count;
+}
+
+
+# Node-generating helper methods for tokens_to_tree
+
+# Generic node generator
+
+sub node         { return { "type" => $_[0], "content" => $_[1] }; }
+
+# Generators for specific non-element nodes
+
+sub text_node    { return node ("text",    $_[0]); }
+sub comment_node { return node ("comment", $_[0]); }
+sub pi_node      { return node ("pi",      $_[0]); }
+sub doctype_node { return node ("DOCTYPE", $_[0]); }
+sub cdata_node   { return node ("CDATA",   $_[0]); }
+
+# For an element node, create a standard node with the type and content
+# key/value pairs. Then add pairs for the "name", "open_tag", and
+# "close_tag" hash keys.
+
+sub element_node
+{
+my ($open_tag, $close_tag, $children) = @_;
+
+  my $elt = node ("elt", $children);
+  # name is the open tag with angle brackets and attibutes stripped
+  $elt->{name} = extract_tag_name ($open_tag);
+  $elt->{open_tag} = $open_tag;
+  $elt->{close_tag} = $close_tag;
+  return $elt;
+}
+
+# ----------------------------------------------------------------------
+
+# Convert the given XML document tree (or subtree) to string form by
+# concatentating all of its components.  Argument is a reference
+# to a list of nodes at a given level of the tree.
+
+# Does not modify the node list.
+
+sub tree_stringify
+{
+my $self = shift;
+my $children = shift || $self->{tree}; # use entire tree if no arg;
+my $str = "";
+
+  for (my $i = 0; $i < @{$children}; $i++)
+  {
+    my $child = $children->[$i];
+
+    # - Elements have list of child nodes as content (process recursively)
+    # - All other node types have text content
+
+    if ($child->{type} eq "elt")
+    {
+      $str .= $child->{open_tag}
+          . $self->tree_stringify ($child->{content})
+          . $child->{close_tag};
+    }
+    else
+    {
+      $str .= $child->{content};
+    }
+  }
+  return $str;
+}
+
+# ----------------------------------------------------------------------
+
+
+# Put tree in "canonical" form by eliminating extraneous whitespace
+# from element text content.
+
+# $children is a list of child nodes
+
+# This function modifies the node list.
+
+# Canonizing occurs as follows:
+# - Comment, PI, DOCTYPE, and CDATA nodes remain untouched
+# - Verbatim elements and their descendants remain untouched
+# - Within non-normalized block elements:
+#   - Delete all-whitespace text node children
+#   - Leave other text node children untouched
+# - Within normalized block elements:
+#   - Convert runs of whitespace (including line-endings) to single spaces
+#   - Trim leading whitespace of first text node
+#   - Trim trailing whitespace of last text node
+#   - Trim whitespace that is adjacent to a verbatim or non-normalized
+#     sub-element.  (For example, if a <programlisting> is followed by
+#     more text, delete any whitespace at beginning of that text.)
+# - Within inline elements:
+#   - Normalize the same way as the enclosing block element, with the
+#     exception that a space at the beginning or end is not removed.
+#     (Otherwise, <para>three<literal> blind </literal>mice</para>
+#     would become <para>three<literal>blind</literal>mice</para>.)
+
+sub tree_canonize
+{
+my $self = shift;
+
+  $self->{tree} = $self->tree_canonize2 ($self->{tree}, "*DOCUMENT");
+}
+
+
+sub tree_canonize2
+{
+my $self = shift;
+my $children = shift;
+my $par_name = shift;
+
+  # Formatting options for parent
+  my $par_opts = $self->get_opts ($par_name);
+
+  # If parent is a block element, remember its formatting options on
+  # the block stack so they can be used to control canonization of
+  # inline child elements.
+
+  $self->begin_block ($par_name, $par_opts) if $par_opts->{format} eq "block";
+
+  # Iterate through list of child nodes to preserve, modify, or
+  # discard whitespace.  Return resulting list of children.
+
+  # Canonize element and text nodes. Leave everything else (comments,
+  # processing instructions, etc.) untouched.
+
+  my @new_children = ();
+
+  while (@{$children})
+  {
+    my $child = shift (@{$children});
+
+    if ($child->{type} eq "elt")
+    {
+      # Leave verbatim elements untouched. For other element nodes,
+      # canonize child list using options appropriate to element.
+
+      if ($self->get_opts ($child->{name})->{format} ne "verbatim")
+      {
+        $child->{content} = $self->tree_canonize2 ($child->{content},
+                            $child->{name});
+      }
+    }
+    elsif ($child->{type} eq "text")
+    {
+      # Delete all-whitespace node or strip whitespace as appropriate.
+
+      # Paranoia check: We should never get here for verbatim elements,
+      # because normalization is irrelevant for them.
+
+      die "LOGIC ERROR: trying to canonize verbatim element $par_name!\n"
+        if $par_opts->{format} eq "verbatim";
+
+      if (!$self->block_normalize ())
+      {
+        # Enclosing block is not normalized:
+        # - Delete child all-whitespace text nodes.
+        # - Leave other text nodes untouched.
+
+        next if $child->{content} =~ /^\s*$/;
+      }
+      else
+      {
+        # Enclosing block is normalized, so normalize this text node:
+        # - Convert runs of whitespace characters (including
+        #   line-endings characters) to single spaces.
+        # - Trim leading whitespace if this node is the first child
+        #   of a block element or it follows a non-normalized node.
+        # - Trim leading whitespace if this node is the last child
+        #   of a block element or it precedes a non-normalized node.
+
+        # These are nil if there is no prev or next child
+        my $prev_child = $new_children[$#new_children];
+        my $next_child = $children->[0];
+
+        $child->{content} =~ s/\s+/ /g;
+        $child->{content} =~ s/^ //
+          if (!defined ($prev_child) && $par_opts->{format} eq "block")
+            || $self->non_normalized_node ($prev_child);
+        $child->{content} =~ s/ $//
+          if (!defined ($next_child) && $par_opts->{format} eq "block")
+            || $self->non_normalized_node ($next_child);
+
+        # If resulting text is empty, discard the node.
+        next if $child->{content} =~ /^$/;
+      }
+    }
+    push (@new_children, $child);
+  }
+
+  # Pop block stack if parent was a block element
+  $self->end_block () if $par_opts->{format} eq "block";
+
+  return \@new_children;
+}
+
+
+# Helper function for tree_canonize().
+
+# Determine whether a node is normalized.  This is used to check
+# the node that is adjacent to a given text node (either previous
+# or following).
+# - No is node is nil
+# - No if the node is a verbatim element
+# - If the node is a block element, yes or no according to its
+#   normalize option
+# - No if the node is an inline element.  Inlines are normalized
+#   if the parent block is normalized, but this method is not called
+#   except while examinine normalized blocks. So its inline children
+#   are also normalized.
+# - No if node is a comment, PI, DOCTYPE, or CDATA section. These are
+#   treated like verbatim elements.
+
+sub non_normalized_node
+{
+my $self = shift;
+my $node = shift;
+
+  return 0 if !$node;
+  my $type = $node->{type};
+  if ($type eq "elt")
+  {
+    my $node_opts = $self->get_opts ($node->{name});
+    if ($node_opts->{format} eq "verbatim")
+    {
+      return 1;
+    }
+    if ($node_opts->{format} eq "block")
+    {
+      return $node_opts->{normalize} eq "no";
+    }
+    if ($node_opts->{format} eq "inline")
+    {
+      return 0;
+    }
+    die "LOGIC ERROR: non_normalized_node: unhandled node format.\n";
+  }
+  if ($type eq "comment" || $type eq "pi" || $type eq "DOCTYPE"
+            || $type eq "CDATA")
+  {
+    return 1;
+  }
+  if ($type eq "text")
+  {
+    die "LOGIC ERROR: non_normalized_node: got called for text node.\n";
+  }
+  die "LOGIC ERROR: non_normalized_node: unhandled node type.\n";
+}
+
+# ----------------------------------------------------------------------
+
+# Format (pretty-print) the document tree
+
+# Does not modify the node list.
+
+# The class maintains two variables for storing output:
+# - out_doc stores content that has been seen and "flushed".
+# - pending stores an array of strings (content of text nodes and inline
+#   element tags).  These are held until they need to be flushed, at
+#   which point they are concatenated and possibly wrapped/indented.
+#   Flushing occurs when a break needs to be written, which happens
+#   when something other than a text node or inline element is seen.
+
+# If parent name and children are not given, format the entire document.
+# Assume prevailing indent = 0 if not given.
+
+sub tree_format
+{
+my $self = shift;
+my $par_name = shift || "*DOCUMENT";    # format entire document if no arg
+my $children = shift || $self->{tree};  # use entire tree if no arg
+my $indent = shift || 0;
+
+  # Formatting options for parent element
+  my $par_opts = $self->get_opts ($par_name);
+
+  # If parent is a block element:
+  # - Remember its formatting options on the block stack so they can
+  #   be used to control formatting of inline child elements.
+  # - Set initial break type to entry-break.
+  # - Shift prevailing indent right before generating child content.
+
+  if ($par_opts->{format} eq "block")
+  {
+    $self->begin_block ($par_name, $par_opts);
+    $self->set_block_break_type ("entry-break");
+    $indent += $par_opts->{"subindent"};
+  }
+
+  # Variables for keeping track of whether the previous child
+  # was a text node. Used for controlling break behavior in
+  # non-normalized block elements: No line breaks are added around
+  # text in such elements, nor is indenting added.
+
+  my $prev_child_is_text = 0;
+  my $cur_child_is_text = 0;
+
+  foreach my $child (@{$children})
+  {
+    $prev_child_is_text = $cur_child_is_text;
+
+    # Text nodes: just add text to pending output
+
+    if ($child->{type} eq "text")
+    {
+      $cur_child_is_text = 1;
+      $self->add_to_pending ($child->{content});
+      next;
+    }
+
+    $cur_child_is_text = 0;
+
+    # Element nodes: handle depending on format type
+
+    if ($child->{type} eq "elt")
+    {
+      my $child_opts = $self->get_opts ($child->{name});
+
+      # Verbatim elements:
+      # - Print literally without change (use _stringify).
+      # - Do not line-wrap or add any indent.
+
+      if ($child_opts->{format} eq "verbatim")
+      {
+        $self->flush_pending ($indent);
+        $self->emit_break (0)
+          unless $prev_child_is_text && !$self->block_normalize ();
+        $self->set_block_break_type ("element-break");
+        $self->add_to_doc ($child->{open_tag}
+                          . $self->tree_stringify ($child->{content})
+                          . $child->{close_tag});
+        next;
+      }
+
+      # Inline elements:
+      # - Do not break or indent.
+      # - Do not line-wrap content; just add content to pending output
+      #   and let it be wrapped as part of parent's content.
+
+      if ($child_opts->{format} eq "inline")
+      {
+        $self->add_to_pending ($child->{open_tag});
+        $self->tree_format ($child->{name}, $child->{content}, $indent);
+        $self->add_to_pending ($child->{close_tag});
+        next;
+      }
+
+      # If we get here, node is a block element.
+
+      # - Break and flush any pending output
+      # - Break and indent (no indent if break count is zero)
+      # - Process element itself:
+      #   - Put out opening tag
+      #   - Put out element content
+      #   - Put out any indent needed before closing tag. None needed if:
+      #     - Element's exit-break is 0 (closing tag is not on new line,
+      #       so don't indent it)
+      #     - There is no separate closing tag (it was in <abc/> format)
+      #     - Element has no children (tags will be written as
+      #       <abc></abc>, so don't indent closing tag)
+      #     - Element has children, but the block is not normalized and
+      #       the last child is a text node
+      #   - Put out closing tag
+
+      $self->flush_pending ($indent);
+      $self->emit_break ($indent)
+        unless $prev_child_is_text && !$self->block_normalize ();
+      $self->set_block_break_type ("element-break");
+      $self->add_to_doc ($child->{open_tag});
+      $self->tree_format ($child->{name}, $child->{content}, $indent);
+      $self->add_to_doc (" " x $indent)
+        unless $child_opts->{"exit-break"} <= 0
+        || $child->{close_tag} eq ""
+        || !@{$child->{content}}
+        || (@{$child->{content}}
+              && $child->{content}->[$#{$child->{content}}]->{type} eq "text"
+              && $child_opts->{normalize} eq "no");
+      $self->add_to_doc ($child->{close_tag});
+      next;
+    }
+
+    # Comments, PIs, etc. (everything other than text and elements),
+    # treat similarly to verbatim block:
+    # - Flush any pending output
+    # - Put out a break
+    # - Add node content to collected output
+
+    $self->flush_pending ($indent);
+    $self->emit_break (0)
+      unless $prev_child_is_text && !$self->block_normalize ();
+    $self->set_block_break_type ("element-break");
+    $self->add_to_doc ($child->{content});
+  }
+
+  $prev_child_is_text = $cur_child_is_text;
+
+  # Done processing current element's children now.
+
+  # If current element is a block element:
+  # - If there were any children, flush any pending output and put
+  #   out the exit break.
+  # - Pop the block stack
+
+  if ($par_opts->{format} eq "block")
+  {
+    if (@{$children})
+    {
+      $self->flush_pending ($indent);
+      $self->set_block_break_type ("exit-break");
+      $self->emit_break (0)
+        unless $prev_child_is_text && !$self->block_normalize ();
+    }
+    $self->end_block ();
+  }
+}
+
+
+# Emit a break - the appropriate number of newlines according to the
+# enclosing block's current break type.
+
+# In addition, emit the number of spaces indicated by indent.  (indent
+# > 0 when breaking just before emitting an element tag that should
+# be indented within its parent element.)
+
+# Exception: Emit no indent if break count is zero. That indicates
+# any following output will be written on the same output line, not
+# indented on a new line.
+
+# Initially, when processing a node's child list, the break type is
+# set to entry-break. Each subsequent break is an element-break.
+# (After child list has been processed, an exit-break is produced as well.)
+
+sub emit_break
+{
+my ($self, $indent) = @_;
+
+  # number of newlines to emit
+  my $break_value = $self->block_break_value ();
+
+  $self->add_to_doc ("\n" x $break_value);
+  # add indent if there *was* a break
+  $self->add_to_doc (" " x $indent) if $indent > 0 && $break_value > 0;
+}
+
+
+# Flush pending output to output document collected thus far:
+# - Wrap pending contents as necessary, with indent before *each* line.
+# - Add pending text to output document (thus "flushing" it)
+# - Clear pending array.
+
+sub flush_pending
+{
+my ($self, $indent) = @_;
+
+  # Do nothing if nothing to flush
+  return if !@{$self->{pending}};
+
+  # If current block is not normalized:
+  # - Text nodes cannot be modified (no wrapping or indent).  Flush
+  #   text as is without adding a break or indent.
+  # If current block is normalized:
+  # - Add a break.
+  # - If line wrap is disabled:
+  #   - Add indent if there is a break. (If there isn't a break, text
+  #     should immediately follow preceding tag, so don't add indent.)
+  #   - Add text without wrapping
+  # - If line wrap is enabled:
+  #   - First line indent is 0 if there is no break. (Text immediately
+  #     follows preceding tag.) Otherwise first line indent is same as
+  #     prevailing indent.
+  #   - Any subsequent lines get the prevailing indent.
+
+  # After flushing text, advance break type to element-break.
+
+  my $s = "";
+
+  if (!$self->block_normalize ())
+  {
+    $s .= join ("", @{$self->{pending}});
+  }
+  else
+  {
+    $self->emit_break (0);
+    my $wrap_len = $self->block_wrap_length ();
+    my $break_value = $self->block_break_value ();
+    if ($wrap_len <= 0)
+    {
+      $s .= " " x $indent if $break_value > 0;
+      $s .= join ("", @{$self->{pending}});
+    }
+    else
+    {
+      my $first_indent = ($break_value > 0 ? $indent : 0);
+      # Wrap lines, then join by newlines (don't add one at end)
+      my @lines = $self->line_wrap ($self->{pending},
+                  $first_indent,
+                  $indent,
+                  $wrap_len);
+      $s .= join ("\n", @lines);
+    }
+  }
+
+  $self->add_to_doc ($s);
+  $self->{pending} = [ ];
+  $self->set_block_break_type ("element-break");
+}
+
+
+# Perform line-wrapping of string array to lines no longer than given
+# length (including indent).
+# Any word longer than line length appears by itself on line.
+# Return array of lines (not newline-terminated).
+
+# $strs - reference to array of text items to be joined and line-wrapped.
+# Each item may be:
+# - A tag (such as <emphasis role="bold">). This should be treated as
+#   an atomic unit, which is important for preserving inline tags intact.
+# - A possibly multi-word string (such as "This is a string"). In this
+#   latter case, line-wrapping preserves internal whitespace in the
+#   string, with the exception that if whitespace would be placed at
+#   the end of a line, it is discarded.
+
+# $first_indent - indent for first line
+# $rest_indent - indent for any remaining lines
+# $max_len - maximum length of output lines (including indent)
+
+sub line_wrap
+{
+my ($self, $strs, $first_indent, $rest_indent, $max_len) = @_;
+
+  # First, tokenize the strings
+
+  my @words = ();
+  foreach my $str (@{$strs})
+  {
+    if ($str =~ /^</)
+    {
+      # String is a tag; treat as atomic unit and don't split
+      push (@words, $str);
+    }
+    else
+    {
+      # String of white and non-white tokens.
+      # Tokenize into white and non-white tokens.
+      push (@words, ($str =~ /\S+|\s+/g));
+    }
+  }
+
+  # Now merge tokens that are not separated by whitespace tokens. For
+  # example, "<i>", "word", "</i>" gets merged to "<i>word</i>".  But
+  # "<i>", " ", "word", " ", "</i>" gets left as separate tokens.
+
+  my @words2 = ();
+  foreach my $word (@words)
+  {
+    # If there is a previous word that does not end with whitespace,
+    # and the currrent word does not begin with whitespace, concatenate
+    # current word to previous word.  Otherwise append current word to
+    # end of list of words.
+    if (@words2 && $words2[$#words2] !~ /\s$/ && $word !~ /^\s/)
+    {
+      $words2[$#words2] .= $word;
+    }
+    else
+    {
+      push (@words2, $word);
+    }
+  }
+
+  my @lines = ();
+  my $line = "";
+  my $llen = 0;
+  # set the indent for the first line
+  my $indent = $first_indent;
+  # saved-up whitespace to put before next non-white word
+  my $white = "";
+
+  foreach my $word (@words2)   # ... while words remain to wrap
+  {
+    # If word is whitespace, save it. It gets added before next
+    # word if no line-break occurs.
+    if ($word =~ /^\s/)
+    {
+       $white .= $word;
+      next;
+    }
+    my $wlen = length ($word);
+    if ($llen == 0)
+    {
+      # New output line; it gets at least one word (discard any
+      # saved whitespace)
+      $line = " " x $indent . $word;
+      $llen = $indent + $wlen;
+      $indent = $rest_indent;
+      $white = "";
+      next;
+    }
+    if ($llen + length ($white) + $wlen > $max_len)
+    {
+      # Word (plus saved whitespace) won't fit on current line.
+      # Begin new line (discard any saved whitespace).
+      push (@lines, $line);
+      $line = " " x $indent . $word;
+      $llen = $indent + $wlen;
+      $indent = $rest_indent;
+      $white = "";
+      next;
+    }
+    # add word to current line with saved whitespace between
+    $line .= $white . $word;
+    $llen += length ($white) + $wlen;
+    $white = "";
+  }
+
+  # push remaining line, if any
+  push (@lines, $line) if $line ne "";
+
+  return @lines;
+}
+
+1;
+
+# ----------------------------------------------------------------------
+
+# Begin main program
+
+package main;
+
+
+my $usage = <<EOF;
+Usage: $PROG_NAME [options] xml-file
+
+Options:
+--help, -h
+    Print this message and exit.
+--backup suffix -b suffix
+    Back up the input document, adding suffix to the input
+    filename to create the backup filename.
+--canonized-output
+    Proceed only as far as the document canonization stage,
+    printing the result.
+--check-parser
+    Parse the document into tokens and verify that their
+    concatenation is identical to the original input document.
+    This option suppresses further document processing.
+--config-file file_name, -f file_name
+    Specify the configuration filename. If no file is named,
+    xmlformat uses the file named by the environment variable
+    XMLFORMAT_CONF, if it exists, or ./xmlformat.conf, if it
+    exists. Otherwise, xmlformat uses built-in formatting
+    options.
+--in-place, -i
+    Format the document in place, replacing the contents of
+    the input file with the reformatted document. (It's a
+    good idea to use --backup along with this option.)
+--show-config
+    Show configuration options after reading configuration
+    file. This option suppresses document processing.
+--show-unconfigured-elements
+    Show elements that are used in the document but for
+    which no options were specified in the configuration
+    file. This option suppresses document output.
+--verbose, -v
+    Be verbose about processing stages.
+--version, -V
+    Show version information and exit.
+EOF
+
+# Variables for command line options; most are undefined initially.
+my $help;
+my $backup_suffix;
+my $conf_file;
+my $canonize_only;
+my $check_parser;
+my $in_place;
+my $show_conf;
+my $show_unconf_elts;
+my $show_version;
+my $verbose;
+
+GetOptions (
+  # =i means an integer argument is required after the option
+  # =s means a string argument is required after the option
+  # :s means a string argument is optional after the option
+  "help|h"           => \$help,          # print help message
+  "backup|b=s"       => \$backup_suffix, # make backup using suffix
+  "canonized-output" => \$canonize_only, # print canonized document
+  "check-parser"     => \$check_parser,  # verify parser integrity
+  "config-file|f=s"  => \$conf_file,     # config file
+  "in-place|i"       => \$in_place,      # format in place
+  "show-config"      => \$show_conf,     # show configuration file
+  # need better name
+  "show-unconfigured-elements" => \$show_unconf_elts,   # show unconfigured elements
+  "verbose|v"        => \$verbose,       # be verbose
+  "version|V"        => \$show_version,  # show version info
+) or do { print "$usage\n"; exit (1); };
+
+if (defined ($help))
+{
+  print "$usage\n";
+  exit (0);
+}
+
+if (defined ($show_version))
+{
+  print "$PROG_NAME $PROG_VERSION ($PROG_LANG version)\n";
+  exit (0);
+}
+
+# --in-place option requires a named file
+
+warn "WARNING: --in-place/-i option ignored (requires named input files)\n"
+  if defined ($in_place) && @ARGV == 0;
+
+# --backup/-b is meaningless without --in-place
+
+if (defined ($backup_suffix))
+{
+  if (!defined ($in_place))
+  {
+    die "--backup/-b option meaningless without --in-place/-i option\n";
+  }
+}
+
+# Save input filenames
+my @in_file = @ARGV;
+
+my $xf = XMLFormat->new ();
+
+# If a configuration file was named explicitly, use it. An error occurs
+# if the file does not exist.
+
+# If no configuration file was named, fall back to:
+# - The file named by the environment variable XMLFORMAT_CONF, if it exists
+# - ./xmlformat.conf, if it exists
+
+# If no configuration file can be found at all, the built-in default options
+# are used. (These are set up in new().)
+
+my $env_conf_file = $ENV{XMLFORMAT_CONF};
+my $def_conf_file = "./xmlformat.conf";
+
+# If no config file was named, but XMLFORMAT_CONF is set, use its value
+# as the config file name.
+if (!defined ($conf_file))
+{
+  $conf_file = $env_conf_file if defined ($env_conf_file);
+}
+# If config file still isn't defined, use the default file if it exists.
+if (!defined ($conf_file))
+{
+  if (-r $def_conf_file && ! -d $def_conf_file)
+  {
+    $conf_file = $def_conf_file;
+  }
+}
+if (defined ($conf_file))
+{
+  warn "Reading configuration file...\n" if $verbose;
+  die "Configuration file '$conf_file' is not readable.\n" if ! -r $conf_file;
+  die "Configuration file '$conf_file' is a directory.\n"  if -d $conf_file;
+  $xf->read_config ($conf_file)
+}
+
+if ($show_conf)   # show configuration and exit
+{
+  $xf->display_config ();
+  exit(0);
+}
+
+my ($in_doc, $out_doc);
+
+# Process arguments.
+# - If no files named, read string, write to stdout.
+# - If files named, read and process each one. Write output to stdout
+#   unless --in-place option was given.  Make backup of original file
+#   if --backup option was given.
+
+if (@ARGV == 0)
+{
+  warn "Reading document...\n" if $verbose;
+  {
+    local $/ = undef;
+    $in_doc = <>;            # slurp input document as single string
+  }
+
+  $out_doc = $xf->process_doc ($in_doc,
+              $verbose, $check_parser, $canonize_only, $show_unconf_elts);
+  if (defined ($out_doc))
+  {
+    warn "Writing output document...\n" if $verbose;
+    print $out_doc;
+  }
+}
+else
+{
+  foreach my $file (@ARGV)
+  {
+    warn "Reading document $file...\n" if $verbose;
+    open (IN, $file)
+      or die "Cannot read $file: $!\n";
+    {
+      local $/ = undef;
+      $in_doc = <IN>;            # slurp input document as single string
+    }
+    close (IN);
+    $out_doc = $xf->process_doc ($in_doc,
+                $verbose, $check_parser, $canonize_only, $show_unconf_elts);
+    next unless defined ($out_doc);
+    if (defined ($in_place))
+    {
+      if (defined ($backup_suffix))
+      {
+        warn "Making backup of $file to $file$backup_suffix...\n" if $verbose;
+        rename ($file, $file . $backup_suffix)
+          or die "Could not rename $file to $file$backup_suffix: $!\n";
+      }
+      warn "Writing output document to $file...\n" if $verbose;
+      open (OUT, ">$file") or die "Cannot write to $file: $!\n";
+      print OUT $out_doc;
+      close (OUT);
+    }
+    else
+    {
+      warn "Writing output document...\n" if $verbose;
+      print $out_doc;
+    }
+  }
+}
+
+warn "Done!\n" if $verbose;
+
+exit (0);



Summary of changes:
 guide/C/ch_accts.xml                 |    4 +-
 guide/C/ch_basics.xml                |   80 +-
 guide/C/ch_cc.xml                    |   20 +-
 guide/C/ch_invest.xml                |   54 +-
 guide/C/ch_reports.xml               |    2 +-
 guide/de/ch_accts.xml                |    2 +-
 guide/de/ch_basics.xml               |   16 +-
 guide/de/ch_cc.xml                   |   20 +-
 guide/de/ch_currency.xml             |    2 +-
 guide/de/ch_invest.xml               |   53 +-
 guide/de/gnucash-guide.xml           |   10 +-
 guide/it/gnucash-guide.xml           |    4 +-
 guide/ja/ch_accts.xml                |    4 +-
 guide/ja/ch_basics.xml               |   20 +-
 guide/ja/ch_cc.xml                   |   20 +-
 guide/ja/ch_currency.xml             |    2 +-
 guide/ja/ch_invest.xml               |   60 +-
 guide/ja/gnucash-guide.xml           |    8 +-
 guide/pt/ch_accts.xml                |    4 +-
 guide/pt/ch_basics.xml               |   22 +-
 guide/pt/ch_cc.xml                   |   20 +-
 guide/pt/ch_currency.xml             |    2 +-
 guide/pt/ch_invest.xml               |   22 +-
 guide/pt/gnucash-guide.xml           |    6 +-
 guide/ru/ch_accts.xml                |    4 +-
 guide/ru/ch_basics.xml               |   22 +-
 guide/ru/ch_cc.xml                   |   20 +-
 guide/ru/ch_currency.xml             |    2 +-
 guide/ru/ch_invest.xml               |   54 +-
 guide/ru/gnucash-guide.xml           |    6 +-
 help/C/Help_ch_Account-Actions.xml   |   30 +-
 help/C/Help_ch_GUIMenus.xml          |  156 +--
 help/C/Help_ch_Reports.xml           |    2 +-
 help/C/Help_ch_Tools_Assistants.xml  |    6 +-
 help/C/Help_ch_Transactions.xml      |   12 +-
 help/C/gnucash-help.xml              |    9 +-
 help/de/Help_ch_GettingStarted.xml   |    8 +-
 help/de/gnucash-help.xml             |    6 +-
 help/pt/Help_ch_Account-Actions.xml  |   25 +-
 help/pt/Help_ch_GUIMenus.xml         |  140 +--
 help/pt/Help_ch_Reports.xml          |    2 +-
 help/pt/Help_ch_Tools_Assistants.xml |    2 +-
 help/pt/Help_ch_Transactions.xml     |    2 +-
 help/pt/gnucash-help.xml             |   39 +-
 util/xmlformat/README                |   20 +
 util/xmlformat/configure.ac          |    7 +
 util/xmlformat/xmldocs.make          |   13 +
 util/xmlformat/xmlformat.conf        |   77 ++
 util/xmlformat/xmlformat.pl          | 1745 ++++++++++++++++++++++++++++++++++
 49 files changed, 2359 insertions(+), 507 deletions(-)
 create mode 100644 util/xmlformat/README
 create mode 100644 util/xmlformat/configure.ac
 create mode 100644 util/xmlformat/xmldocs.make
 create mode 100644 util/xmlformat/xmlformat.conf
 create mode 100755 util/xmlformat/xmlformat.pl



More information about the gnucash-changes mailing list