From db0b08db8fb356439bc08a22eb3b61eea3022bf9 Mon Sep 17 00:00:00 2001
From: Hiroki Sato <hrs@FreeBSD.org>
Date: Mon, 11 Nov 2013 06:52:59 +0000
Subject: [PATCH] - Define l10n.ent as an entity in localized directories and
 make them be   picked up via XML catalog in freebsd50.ent or
 xhtml10-freebsd.dtd,   not entities.ent.  The L10N entities always come first
 to be able to   override everything.

- Define &nbsp; as &#x20; in EUC-JP encoding.  This is a workaround to
  prevent an invalid character in EUC-JP caused by converting 0xa0 in
  UTF-8 (EUC-JP does not allow 0xa0) in XSLT processing.  Theoretically
  it should be &#xa0; still in the final XML output.

- Make XML catalog resolution consistent for l10n.ent.  This should be
  revisited for the others later.
---
 da_DK.ISO8859-1/share/xml/catalog.xml   |  2 ++
 da_DK.ISO8859-1/share/xml/entities.ent  |  3 ---
 de_DE.ISO8859-1/share/xml/catalog.xml   |  6 +++---
 de_DE.ISO8859-1/share/xml/entities.ent  |  3 ---
 el_GR.ISO8859-7/share/xml/catalog.xml   |  3 +++
 el_GR.ISO8859-7/share/xml/entities.ent  |  3 ---
 en_US.ISO8859-1/share/xml/catalog.xml   |  3 +++
 en_US.ISO8859-1/share/xml/entities.ent  |  9 +++------
 es_ES.ISO8859-1/share/xml/catalog.xml   |  5 ++---
 es_ES.ISO8859-1/share/xml/entities.ent  |  3 ---
 fr_FR.ISO8859-1/share/xml/catalog.xml   |  4 ++--
 fr_FR.ISO8859-1/share/xml/entities.ent  |  3 ---
 hu_HU.ISO8859-2/share/xml/catalog.xml   |  4 ++--
 hu_HU.ISO8859-2/share/xml/entities.ent  |  3 ---
 it_IT.ISO8859-15/share/xml/catalog.xml  |  4 ++--
 it_IT.ISO8859-15/share/xml/entities.ent |  3 ---
 ja_JP.eucJP/share/xml/catalog.xml       |  4 ++--
 ja_JP.eucJP/share/xml/entities.ent      |  3 ---
 ja_JP.eucJP/share/xml/l10n.ent          |  2 ++
 mn_MN.UTF-8/share/xml/catalog.xml       |  6 +++---
 mn_MN.UTF-8/share/xml/entities.ent      |  3 ---
 nl_NL.ISO8859-1/share/xml/catalog.xml   |  4 ++--
 nl_NL.ISO8859-1/share/xml/entities.ent  |  3 ---
 pl_PL.ISO8859-2/share/xml/catalog.xml   |  6 +++---
 pl_PL.ISO8859-2/share/xml/entities.ent  |  3 ---
 pt_BR.ISO8859-1/share/xml/catalog.xml   |  6 +++---
 pt_BR.ISO8859-1/share/xml/entities.ent  |  3 ---
 ru_RU.KOI8-R/share/xml/catalog.xml      |  4 ++--
 ru_RU.KOI8-R/share/xml/entities.ent     |  3 ---
 share/mk/doc.xml.mk                     |  2 +-
 share/xml/catalog.xml                   |  4 ++--
 share/xml/freebsd50.dtd                 | 23 ++++++++++++++++-------
 share/xml/l10n-common.ent               | 18 ++++++++++++++++++
 share/xml/l10n.ent                      | 13 ++++---------
 share/xml/xhtml10-freebsd.dtd           |  6 +++++-
 share/xml/xslt10-freebsd.dtd            |  8 ++++----
 sr_YU.ISO8859-2/share/xml/catalog.xml   | 18 ++++++++++++++++++
 sr_YU.ISO8859-2/share/xml/entities.ent  |  3 ---
 tr_TR.ISO8859-9/share/xml/catalog.xml   |  3 +++
 tr_TR.ISO8859-9/share/xml/entities.ent  |  3 ---
 zh_CN.GB2312/share/xml/catalog.xml      |  4 ++--
 zh_CN.GB2312/share/xml/entities.ent     |  3 ---
 zh_TW.Big5/share/xml/catalog.xml        |  4 ++--
 zh_TW.Big5/share/xml/entities.ent       |  3 ---
 44 files changed, 114 insertions(+), 112 deletions(-)
 create mode 100644 share/xml/l10n-common.ent
 create mode 100644 sr_YU.ISO8859-2/share/xml/catalog.xml

diff --git a/da_DK.ISO8859-1/share/xml/catalog.xml b/da_DK.ISO8859-1/share/xml/catalog.xml
index 68a49c118f..945a226d14 100644
--- a/da_DK.ISO8859-1/share/xml/catalog.xml
+++ b/da_DK.ISO8859-1/share/xml/catalog.xml
@@ -10,6 +10,8 @@
   <rewriteURI uriStartString="http://www.FreeBSD.org/XML/www/lang/"
               rewritePrefix="../../"/>
 
+  <public publicId="-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
+        uri="l10n.ent" />
   <public publicId="-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//EN"
         uri="entities.ent"/>
   <public publicId="-//FreeBSD//ENTITIES DocBook Translator Entities//DK"
diff --git a/da_DK.ISO8859-1/share/xml/entities.ent b/da_DK.ISO8859-1/share/xml/entities.ent
index f59c2fe83c..b6e267f855 100644
--- a/da_DK.ISO8859-1/share/xml/entities.ent
+++ b/da_DK.ISO8859-1/share/xml/entities.ent
@@ -7,9 +7,6 @@
 <!ENTITY % translators PUBLIC "-//FreeBSD//ENTITIES DocBook Translator Entities//DK"
 	"translators.ent">
 %translators;
-<!ENTITY % l10n PUBLIC "-//FreeBSD//ENTITIES DocBook Language Specific Entities//EN"
-	"l10n.ent">
-%l10n;
 <!ENTITY % mailing-lists PUBLIC "-//FreeBSD//ENTITIES DocBook Mailing List Entities//DK"
 	"mailing-lists.ent">
 %mailing-lists;
diff --git a/de_DE.ISO8859-1/share/xml/catalog.xml b/de_DE.ISO8859-1/share/xml/catalog.xml
index 6e76ac8d3a..71671439e0 100644
--- a/de_DE.ISO8859-1/share/xml/catalog.xml
+++ b/de_DE.ISO8859-1/share/xml/catalog.xml
@@ -13,15 +13,15 @@
   <rewriteURI uriStartString="http://www.FreeBSD.org/XML/www/lang/"
               rewritePrefix="../../"/>
 
+  <public
+        publicId="-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
+        uri="l10n.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//EN"
         uri="entities.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES DocBook Translator Entities//DE"
         uri="translators.ent" />
-  <public
-        publicId="-//FreeBSD//ENTITIES FreeBSD L10N Entities//EN"
-        uri="l10n.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES FreeBSD Release L10N Entities//EN"
         uri="release.l10n.ent" />
diff --git a/de_DE.ISO8859-1/share/xml/entities.ent b/de_DE.ISO8859-1/share/xml/entities.ent
index fcd24d2368..43c6c7aecf 100644
--- a/de_DE.ISO8859-1/share/xml/entities.ent
+++ b/de_DE.ISO8859-1/share/xml/entities.ent
@@ -25,9 +25,6 @@
 <!ENTITY % trademarks PUBLIC "-//FreeBSD//ENTITIES DocBook Trademark Entities//EN"
 	"nonexistent">
 %trademarks;
-<!ENTITY % l10n PUBLIC "-//FreeBSD//ENTITIES DocBook Language Specific Entities//EN"
-	"l10n.ent">
-%l10n;
 <!ENTITY % urls PUBLIC "-//FreeBSD//ENTITIES DocBook URL Entities//EN"
 	"nonexistent">
 %urls;
diff --git a/el_GR.ISO8859-7/share/xml/catalog.xml b/el_GR.ISO8859-7/share/xml/catalog.xml
index a3feec86ca..0417d6c356 100644
--- a/el_GR.ISO8859-7/share/xml/catalog.xml
+++ b/el_GR.ISO8859-7/share/xml/catalog.xml
@@ -10,6 +10,9 @@
   <rewriteURI uriStartString="http://www.FreeBSD.org/XML/www/lang/"
               rewritePrefix="../../"/>
 
+  <public
+        publicId="-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
+        uri="l10n.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//EN"
         uri="entities.ent" />
diff --git a/el_GR.ISO8859-7/share/xml/entities.ent b/el_GR.ISO8859-7/share/xml/entities.ent
index e737c57c22..bfc2e5b045 100644
--- a/el_GR.ISO8859-7/share/xml/entities.ent
+++ b/el_GR.ISO8859-7/share/xml/entities.ent
@@ -13,9 +13,6 @@
 
 -->
 
-<!ENTITY % l10n PUBLIC "-//FreeBSD//ENTITIES DocBook Language Specific Entities//EN"
-	"l10n.ent">
-%l10n;
 <!ENTITY % translators PUBLIC "-//FreeBSD//ENTITIES DocBook Translator Entities//EL"
 	"translators.ent">
 %translators;
diff --git a/en_US.ISO8859-1/share/xml/catalog.xml b/en_US.ISO8859-1/share/xml/catalog.xml
index 7f0d5f9037..4fb8dfd9ae 100644
--- a/en_US.ISO8859-1/share/xml/catalog.xml
+++ b/en_US.ISO8859-1/share/xml/catalog.xml
@@ -14,6 +14,9 @@
   <rewriteURI uriStartString="http://www.FreeBSD.org/XML/www/lang/"
               rewritePrefix="../../"/>
 
+  <public
+        publicId="-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
+        uri="l10n.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//EN"
         uri="entities.ent" />
diff --git a/en_US.ISO8859-1/share/xml/entities.ent b/en_US.ISO8859-1/share/xml/entities.ent
index ffd135e39a..85e3fbe915 100644
--- a/en_US.ISO8859-1/share/xml/entities.ent
+++ b/en_US.ISO8859-1/share/xml/entities.ent
@@ -1,10 +1,7 @@
 <!-- $FreeBSD$ -->
 
-<!ENTITY % l10n PUBLIC "-//FreeBSD//ENTITIES DocBook Language Specific Entities//EN"
-	"l10n.ent">
-%l10n;
 <!ENTITY % freebsd PUBLIC "-//FreeBSD//ENTITIES DocBook Miscellaneous FreeBSD Entities//EN"
-	"../../../share/xml/freebsd.ent">
+	"nonexistent">
 %freebsd;
 <!ENTITY % teams PUBLIC "-//FreeBSD//ENTITIES DocBook Team Entities//EN"
 	"teams.ent">
@@ -16,8 +13,8 @@
 	"newsgroups.ent">
 %newsgroups;
 <!ENTITY % trademarks PUBLIC "-//FreeBSD//ENTITIES DocBook Trademark Entities//EN"
-	"../../../share/xml/trademarks.ent">
+	"nonexistent">
 %trademarks;
 <!ENTITY % urls PUBLIC "-//FreeBSD//ENTITIES DocBook URL Entities//EN"
-	"../../../share/xml/urls.ent">
+	"nonexistent">
 %urls;
diff --git a/es_ES.ISO8859-1/share/xml/catalog.xml b/es_ES.ISO8859-1/share/xml/catalog.xml
index 72795603b7..d947212956 100644
--- a/es_ES.ISO8859-1/share/xml/catalog.xml
+++ b/es_ES.ISO8859-1/share/xml/catalog.xml
@@ -10,12 +10,11 @@
   <rewriteURI uriStartString="http://www.FreeBSD.org/XML/www/lang/"
               rewritePrefix="../../"/>
 
+  <public publicId="-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
+        uri="l10n.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//EN"
         uri="entities.ent" />
-
-  <public publicId="-//FreeBSD//ENTITIES FreeBSD L10N Entities//EN"
-        uri="l10n.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES FreeBSD Release L10N Entities//EN"
         uri="release.l10n.ent" />
diff --git a/es_ES.ISO8859-1/share/xml/entities.ent b/es_ES.ISO8859-1/share/xml/entities.ent
index 196fe80ed6..9b3be9482d 100644
--- a/es_ES.ISO8859-1/share/xml/entities.ent
+++ b/es_ES.ISO8859-1/share/xml/entities.ent
@@ -2,9 +2,6 @@
 	$FreeBSD$
 -->
 
-<!ENTITY % l10n PUBLIC "-//FreeBSD//ENTITIES DocBook Language Specific Entities//EN"
-	"l10n.ent">
-%l10n;
 <!ENTITY % freebsd PUBLIC "-//FreeBSD//ENTITIES DocBook Miscellaneous FreeBSD Entities//EN"
 	"nonexistent">
 %freebsd;
diff --git a/fr_FR.ISO8859-1/share/xml/catalog.xml b/fr_FR.ISO8859-1/share/xml/catalog.xml
index 0b06d43c89..d947212956 100644
--- a/fr_FR.ISO8859-1/share/xml/catalog.xml
+++ b/fr_FR.ISO8859-1/share/xml/catalog.xml
@@ -10,11 +10,11 @@
   <rewriteURI uriStartString="http://www.FreeBSD.org/XML/www/lang/"
               rewritePrefix="../../"/>
 
+  <public publicId="-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
+        uri="l10n.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//EN"
         uri="entities.ent" />
-  <public publicId="-//FreeBSD//ENTITIES FreeBSD L10N Entities//EN"
-        uri="l10n.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES FreeBSD Release L10N Entities//EN"
         uri="release.l10n.ent" />
diff --git a/fr_FR.ISO8859-1/share/xml/entities.ent b/fr_FR.ISO8859-1/share/xml/entities.ent
index 0b84bfc31c..d2663a08ec 100644
--- a/fr_FR.ISO8859-1/share/xml/entities.ent
+++ b/fr_FR.ISO8859-1/share/xml/entities.ent
@@ -2,9 +2,6 @@
   Original revision: 1.2
 -->
 
-<!ENTITY % l10n PUBLIC "-//FreeBSD//ENTITIES DocBook Language Specific Entities//EN"
-	"l10n.ent">
-%l10n;
 <!ENTITY % translators PUBLIC "-//FreeBSD//ENTITIES DocBook Translator Entities//FR"
 	"translators.ent">
 %translators;
diff --git a/hu_HU.ISO8859-2/share/xml/catalog.xml b/hu_HU.ISO8859-2/share/xml/catalog.xml
index 0b06d43c89..d947212956 100644
--- a/hu_HU.ISO8859-2/share/xml/catalog.xml
+++ b/hu_HU.ISO8859-2/share/xml/catalog.xml
@@ -10,11 +10,11 @@
   <rewriteURI uriStartString="http://www.FreeBSD.org/XML/www/lang/"
               rewritePrefix="../../"/>
 
+  <public publicId="-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
+        uri="l10n.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//EN"
         uri="entities.ent" />
-  <public publicId="-//FreeBSD//ENTITIES FreeBSD L10N Entities//EN"
-        uri="l10n.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES FreeBSD Release L10N Entities//EN"
         uri="release.l10n.ent" />
diff --git a/hu_HU.ISO8859-2/share/xml/entities.ent b/hu_HU.ISO8859-2/share/xml/entities.ent
index 42cc88578f..a544385a89 100644
--- a/hu_HU.ISO8859-2/share/xml/entities.ent
+++ b/hu_HU.ISO8859-2/share/xml/entities.ent
@@ -5,9 +5,6 @@
      %SRCID%	1.2
 -->
 
-<!ENTITY % l10n PUBLIC "-//FreeBSD//ENTITIES DocBook Language Specific Entities//EN"
-	"l10n.ent">
-%l10n;
 <!ENTITY % freebsd PUBLIC "-//FreeBSD//ENTITIES DocBook Miscellaneous FreeBSD Entities//HU"
 	"freebsd.ent">
 %freebsd;
diff --git a/it_IT.ISO8859-15/share/xml/catalog.xml b/it_IT.ISO8859-15/share/xml/catalog.xml
index 0b06d43c89..d947212956 100644
--- a/it_IT.ISO8859-15/share/xml/catalog.xml
+++ b/it_IT.ISO8859-15/share/xml/catalog.xml
@@ -10,11 +10,11 @@
   <rewriteURI uriStartString="http://www.FreeBSD.org/XML/www/lang/"
               rewritePrefix="../../"/>
 
+  <public publicId="-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
+        uri="l10n.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//EN"
         uri="entities.ent" />
-  <public publicId="-//FreeBSD//ENTITIES FreeBSD L10N Entities//EN"
-        uri="l10n.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES FreeBSD Release L10N Entities//EN"
         uri="release.l10n.ent" />
diff --git a/it_IT.ISO8859-15/share/xml/entities.ent b/it_IT.ISO8859-15/share/xml/entities.ent
index 763dd1f74f..76a417a124 100644
--- a/it_IT.ISO8859-15/share/xml/entities.ent
+++ b/it_IT.ISO8859-15/share/xml/entities.ent
@@ -4,9 +4,6 @@
       $FreeBSD$
 -->
 
-<!ENTITY % l10n PUBLIC "-//FreeBSD//ENTITIES DocBook Language Specific Entities//EN"
-	"l10n.ent">
-%l10n;
 <!ENTITY % freebsd PUBLIC "-//FreeBSD//ENTITIES DocBook Miscellaneous FreeBSD Entities//EN"
 	"nonexistent">
 %freebsd;
diff --git a/ja_JP.eucJP/share/xml/catalog.xml b/ja_JP.eucJP/share/xml/catalog.xml
index 0b06d43c89..d947212956 100644
--- a/ja_JP.eucJP/share/xml/catalog.xml
+++ b/ja_JP.eucJP/share/xml/catalog.xml
@@ -10,11 +10,11 @@
   <rewriteURI uriStartString="http://www.FreeBSD.org/XML/www/lang/"
               rewritePrefix="../../"/>
 
+  <public publicId="-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
+        uri="l10n.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//EN"
         uri="entities.ent" />
-  <public publicId="-//FreeBSD//ENTITIES FreeBSD L10N Entities//EN"
-        uri="l10n.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES FreeBSD Release L10N Entities//EN"
         uri="release.l10n.ent" />
diff --git a/ja_JP.eucJP/share/xml/entities.ent b/ja_JP.eucJP/share/xml/entities.ent
index 267defdc4a..aafaaa46e2 100644
--- a/ja_JP.eucJP/share/xml/entities.ent
+++ b/ja_JP.eucJP/share/xml/entities.ent
@@ -1,8 +1,5 @@
 <!-- $FreeBSD$ -->
 
-<!ENTITY % l10n PUBLIC "-//FreeBSD//ENTITIES DocBook Language Specific Entities//EN"
-	"l10n.ent">
-%l10n;
 <!ENTITY % freebsd PUBLIC "-//FreeBSD//ENTITIES DocBook Miscellaneous FreeBSD Entities//EN"
 	"nonexistent">
 %freebsd;
diff --git a/ja_JP.eucJP/share/xml/l10n.ent b/ja_JP.eucJP/share/xml/l10n.ent
index 62d5bce477..c64b231dc5 100644
--- a/ja_JP.eucJP/share/xml/l10n.ent
+++ b/ja_JP.eucJP/share/xml/l10n.ent
@@ -5,6 +5,8 @@
      $FreeBSD$
 -->
 
+<!ENTITY nbsp "&#x20;">
+
 <!-- docformat navi -->
 <!ENTITY docnavi.single-html "��">
 <!ENTITY docnavi.split-html  "ʬ����">
diff --git a/mn_MN.UTF-8/share/xml/catalog.xml b/mn_MN.UTF-8/share/xml/catalog.xml
index 0e9826192d..83ed165e98 100644
--- a/mn_MN.UTF-8/share/xml/catalog.xml
+++ b/mn_MN.UTF-8/share/xml/catalog.xml
@@ -10,13 +10,13 @@
   <rewriteURI uriStartString="http://www.FreeBSD.org/XML/www/lang/"
               rewritePrefix="../../"/>
 
+  <public
+        publicId="-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
+        uri="l10n.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//EN"
         uri="entities.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES DocBook Translator Entities//MN"
         uri="translators.ent" />
-  <public
-        publicId="-//FreeBSD//ENTITIES FreeBSD L10N Entities//EN"
-        uri="l10n.ent" />
 </catalog>
diff --git a/mn_MN.UTF-8/share/xml/entities.ent b/mn_MN.UTF-8/share/xml/entities.ent
index d27a37e871..8ac136c07b 100644
--- a/mn_MN.UTF-8/share/xml/entities.ent
+++ b/mn_MN.UTF-8/share/xml/entities.ent
@@ -21,9 +21,6 @@
 <!ENTITY % trademarks PUBLIC "-//FreeBSD//ENTITIES DocBook Trademark Entities//MN"
 	"trademarks.ent">
 %trademarks;
-<!ENTITY % l10n PUBLIC "-//FreeBSD//ENTITIES DocBook Language Specific Entities//EN"
-	"l10n.ent">
-%l10n;
 <!ENTITY % urls PUBLIC "-//FreeBSD//ENTITIES DocBook URL Entities//EN"
 	"nonexistent">
 %urls;
diff --git a/nl_NL.ISO8859-1/share/xml/catalog.xml b/nl_NL.ISO8859-1/share/xml/catalog.xml
index 6a15219315..8cb29adae0 100644
--- a/nl_NL.ISO8859-1/share/xml/catalog.xml
+++ b/nl_NL.ISO8859-1/share/xml/catalog.xml
@@ -11,11 +11,11 @@
   <rewriteURI uriStartString="http://www.FreeBSD.org/XML/www/lang/"
               rewritePrefix="../../"/>
 
+  <public publicId="-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
+        uri="l10n.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//EN"
         uri="entities.ent" />
-  <public publicId="-//FreeBSD//ENTITIES FreeBSD L10N Entities//EN"
-        uri="l10n.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES FreeBSD Release L10N Entities//EN"
         uri="release.l10n.ent" />
diff --git a/nl_NL.ISO8859-1/share/xml/entities.ent b/nl_NL.ISO8859-1/share/xml/entities.ent
index 31af606e43..197f073227 100644
--- a/nl_NL.ISO8859-1/share/xml/entities.ent
+++ b/nl_NL.ISO8859-1/share/xml/entities.ent
@@ -27,6 +27,3 @@
 <!ENTITY % urls PUBLIC "-//FreeBSD//ENTITIES DocBook URL Entities//EN"
 	"nonexistent">
 %urls;
-<!ENTITY % l10n PUBLIC "-//FreeBSD//ENTITIES DocBook Language Specific Entities//EN"
-	"l10n.ent">
-%l10n;
diff --git a/pl_PL.ISO8859-2/share/xml/catalog.xml b/pl_PL.ISO8859-2/share/xml/catalog.xml
index d43f73af53..0417d6c356 100644
--- a/pl_PL.ISO8859-2/share/xml/catalog.xml
+++ b/pl_PL.ISO8859-2/share/xml/catalog.xml
@@ -10,10 +10,10 @@
   <rewriteURI uriStartString="http://www.FreeBSD.org/XML/www/lang/"
               rewritePrefix="../../"/>
 
+  <public
+        publicId="-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
+        uri="l10n.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//EN"
         uri="entities.ent" />
-  <public
-        publicId="-//FreeBSD//ENTITIES FreeBSD L10N Entities//EN"
-        uri="l10n.ent" />
 </catalog>
diff --git a/pl_PL.ISO8859-2/share/xml/entities.ent b/pl_PL.ISO8859-2/share/xml/entities.ent
index dec7fc8518..5f67e28cbd 100644
--- a/pl_PL.ISO8859-2/share/xml/entities.ent
+++ b/pl_PL.ISO8859-2/share/xml/entities.ent
@@ -5,9 +5,6 @@
      Original revision: 1.2
 -->
 
-<!ENTITY % l10n PUBLIC "-//FreeBSD//ENTITIES DocBook Language Specific Entities//EN"
-	"l10n.ent">
-%l10n;
 <!ENTITY % freebsd PUBLIC "-//FreeBSD//ENTITIES DocBook Miscellaneous FreeBSD Entities//EN"
 	"nonexistent">
 %freebsd;
diff --git a/pt_BR.ISO8859-1/share/xml/catalog.xml b/pt_BR.ISO8859-1/share/xml/catalog.xml
index d44a80dbca..006a994266 100644
--- a/pt_BR.ISO8859-1/share/xml/catalog.xml
+++ b/pt_BR.ISO8859-1/share/xml/catalog.xml
@@ -10,13 +10,13 @@
   <rewriteURI uriStartString="http://www.FreeBSD.org/XML/www/lang/"
               rewritePrefix="../../"/>
 
+  <public
+        publicId="-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
+        uri="l10n.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//EN"
         uri="entities.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES DocBook Translator Entities//PT"
         uri="translators.ent" />
-  <public
-        publicId="-//FreeBSD//ENTITIES FreeBSD L10N Entities//EN"
-        uri="l10n.ent" />
 </catalog>
diff --git a/pt_BR.ISO8859-1/share/xml/entities.ent b/pt_BR.ISO8859-1/share/xml/entities.ent
index 6776d9dcae..6d0ae757db 100644
--- a/pt_BR.ISO8859-1/share/xml/entities.ent
+++ b/pt_BR.ISO8859-1/share/xml/entities.ent
@@ -10,9 +10,6 @@
 <!ENTITY % words PUBLIC "-//FreeBSD//ENTITIES DocBook Specific Word Translations Entities//PT"
 	"words.ent">
 %words;
-<!ENTITY % l10n PUBLIC "-//FreeBSD//ENTITIES DocBook Language Specific Entities//PT"
-	"l10n.ent">
-%l10n;
 <!ENTITY % mailing-lists PUBLIC "-//FreeBSD//ENTITIES DocBook Mailing List Entities//PT"
 	"mailing-lists.ent">
 %mailing-lists;
diff --git a/ru_RU.KOI8-R/share/xml/catalog.xml b/ru_RU.KOI8-R/share/xml/catalog.xml
index 0b06d43c89..d947212956 100644
--- a/ru_RU.KOI8-R/share/xml/catalog.xml
+++ b/ru_RU.KOI8-R/share/xml/catalog.xml
@@ -10,11 +10,11 @@
   <rewriteURI uriStartString="http://www.FreeBSD.org/XML/www/lang/"
               rewritePrefix="../../"/>
 
+  <public publicId="-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
+        uri="l10n.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//EN"
         uri="entities.ent" />
-  <public publicId="-//FreeBSD//ENTITIES FreeBSD L10N Entities//EN"
-        uri="l10n.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES FreeBSD Release L10N Entities//EN"
         uri="release.l10n.ent" />
diff --git a/ru_RU.KOI8-R/share/xml/entities.ent b/ru_RU.KOI8-R/share/xml/entities.ent
index cb4e534341..3aaa0bc4ab 100644
--- a/ru_RU.KOI8-R/share/xml/entities.ent
+++ b/ru_RU.KOI8-R/share/xml/entities.ent
@@ -22,9 +22,6 @@
 <!ENTITY % trademarks PUBLIC "-//FreeBSD//ENTITIES DocBook Trademark Entities//RU"
 	"trademarks.ent">
 %trademarks;
-<!ENTITY % l10n PUBLIC "-//FreeBSD//ENTITIES DocBook Language Specific Entities//EN"
-	"l10n.ent">
-%l10n;
 <!ENTITY % urls-ru PUBLIC "-//FreeBSD//ENTITIES DocBook URL Entities//RU"
 	"urls.ent">
 %urls-ru;
diff --git a/share/mk/doc.xml.mk b/share/mk/doc.xml.mk
index 67a79a64a9..361b5227d4 100644
--- a/share/mk/doc.xml.mk
+++ b/share/mk/doc.xml.mk
@@ -111,7 +111,7 @@ ${XML_MIRRORS}: ${XML_MIRRORS_MASTER} \
 		--param 'transtable-word-group' "'country'" \
 		--param 'transtable-sortkey.xml' "'$@.sort'" \
 		${XSL_TRANSTABLE} ${XML_MIRRORS_MASTER}
-	${RM} -f $@.sort $@.sort.tmp
+#	${RM} -f $@.sort $@.sort.tmp
 .if ${LANGCODE} != .
 CLEANFILES+=	${XML_MIRRORS}
 CLEANFILES+=	${XML_MIRRORS}.sort
diff --git a/share/xml/catalog.xml b/share/xml/catalog.xml
index bdd495814f..bdfcf6fa1e 100644
--- a/share/xml/catalog.xml
+++ b/share/xml/catalog.xml
@@ -35,10 +35,10 @@
         publicId="-//FreeBSD//ENTITIES FreeBSD Common Entities//EN"
         uri="common.ent" />
   <public
-	publicId="-//FreeBSD//ENTITIES FreeBSD L10N Common Entities//EN"
+	publicId="-//FreeBSD//ENTITIES FreeBSD Language Specific Common Entities//EN"
 	uri="l10n-common.ent" />
   <public
-	publicId="-//FreeBSD//ENTITIES FreeBSD L10N Entities//EN"
+	publicId="-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
 	uri="l10n.ent" />
   <public
 	publicId="-//FreeBSD//DOCUMENT FreeBSD Language Neutral XSLT Library//EN"
diff --git a/share/xml/freebsd50.dtd b/share/xml/freebsd50.dtd
index d9247b8f06..12b922dba8 100644
--- a/share/xml/freebsd50.dtd
+++ b/share/xml/freebsd50.dtd
@@ -1,11 +1,24 @@
-<!ENTITY % orig-docbook PUBLIC "-//OASIS//DTD DocBook XML V5.0//EN"
-	"docbook50.dtd">
-%orig-docbook;
+<!-- $FreeBSD$ -->
+<!ENTITY % l10n PUBLIC "-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
+        "http://www.FreeBSD.org/XML/www/lang/share/xml/l10n.ent">
+%l10n;
+
+<!ENTITY % l10n.common PUBLIC "-//FreeBSD//ENTITIES FreeBSD Language Specific Common Entities//EN"
+        "http://www.FreeBSD.org/XML/www/lang/share/xml/l10n-common.ent">
+%l10n.common;
 
 <!ENTITY % iso8879.ent PUBLIC "-//FreeBSD//ENTITIES ISO 8879:1986 Entity Set//EN//XML"
 	"http://www.FreeBSD.org/XML/www/share/xml/iso8879.ent">
 %iso8879.ent;
 
+<!ENTITY % orig-docbook PUBLIC "-//OASIS//DTD DocBook XML V5.0//EN"
+	"docbook50.dtd">
+%orig-docbook;
+
+<!ENTITY % orig-entities PUBLIC "-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//EN"
+	"entities.ent">
+%orig-entities;
+
 <!ENTITY % authors PUBLIC  "-//FreeBSD//ENTITIES DocBook Author Entities//EN"
 	"authors.ent">
 %authors;
@@ -13,7 +26,3 @@
 <!ENTITY % man PUBLIC "-//FreeBSD//ENTITIES DocBook Manual Page Entities//EN"
 	"man-refs.ent">
 %man;
-
-<!ENTITY % orig-entities PUBLIC "-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//EN"
-	"entities.ent">
-%orig-entities;
diff --git a/share/xml/l10n-common.ent b/share/xml/l10n-common.ent
new file mode 100644
index 0000000000..a97774f95e
--- /dev/null
+++ b/share/xml/l10n-common.ent
@@ -0,0 +1,18 @@
+<!-- -*- sgml -*-
+     DocBook Language Neutral Entities for Localization.
+
+     An entity here can be overridden with the localized version
+     when the entity is defined in
+     PUBLIC "-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
+     in language-specific directory.  Otherwise the following entity
+     set is used by default.
+
+     $FreeBSD$
+-->
+
+<!-- docformat navi -->
+<!ENTITY docnavi.single-html "Single HTML">
+<!ENTITY docnavi.split-html  "Split HTML">
+
+<!-- charset for HTML output -->
+<!ENTITY doc.html.charset "iso-8859-1">
diff --git a/share/xml/l10n.ent b/share/xml/l10n.ent
index d78270303c..feab6a0ec0 100644
--- a/share/xml/l10n.ent
+++ b/share/xml/l10n.ent
@@ -1,18 +1,13 @@
 <!-- -*- sgml -*-
-     DocBook Language Neutral Entities for Localization.
+     Language Specific Entities for Localization.
 
      An entity here can be overridden with the localized version
      when the entity is defined in
-     PUBLIC "-//FreeBSD//ENTITIES DocBook Language Specific Entities//EN"
+     PUBLIC "-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
      in language-specific directory.  Otherwise the following entity
      set is used by default.
 
+     This file should be empty.
+
      $FreeBSD$
 -->
-
-<!-- docformat navi -->
-<!ENTITY docnavi.single-html "Single HTML">
-<!ENTITY docnavi.split-html  "Split HTML">
-
-<!-- charset for HTML output -->
-<!ENTITY doc.html.charset "iso-8859-1">
diff --git a/share/xml/xhtml10-freebsd.dtd b/share/xml/xhtml10-freebsd.dtd
index dc6b573f98..287d4b5b65 100644
--- a/share/xml/xhtml10-freebsd.dtd
+++ b/share/xml/xhtml10-freebsd.dtd
@@ -7,10 +7,14 @@
 "http://www.FreeBSD.org/XML/cwd/autogen.ent">
 %autogen.ent;
 
-<!ENTITY % l10n.ent PUBLIC "-//FreeBSD//ENTITIES FreeBSD L10N Entities//EN"
+<!ENTITY % l10n.ent PUBLIC "-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
 "http://www.FreeBSD.org/XML/doc/share/xml/l10n.ent">
 %l10n.ent;
 
+<!ENTITY % l10n.common.ent PUBLIC "-//FreeBSD//ENTITIES FreeBSD Language Specific Common Entities//EN"
+"http://www.FreeBSD.org/XML/doc/share/xml/l10n-common.ent">
+%l10n.common.ent;
+
 <!ENTITY % common.ent PUBLIC "-//FreeBSD//ENTITIES FreeBSD Common Entities//EN"
 "http://www.FreeBSD.org/XML/doc/share/xml/common.ent">
 %common.ent;
diff --git a/share/xml/xslt10-freebsd.dtd b/share/xml/xslt10-freebsd.dtd
index 28cb0d6b7b..f9ed32865f 100644
--- a/share/xml/xslt10-freebsd.dtd
+++ b/share/xml/xslt10-freebsd.dtd
@@ -22,13 +22,13 @@
 %autogen.ent;
 
 <!ENTITY % l10n.ent
- PUBLIC "-//FreeBSD//ENTITIES FreeBSD L10N Entities//EN"
-        "http://www.FreeBSD.org/XML/www/lang/share/xml/l10n.ent">
+ PUBLIC "-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
+        "http://www.FreeBSD.org/XML/www/share/xml/l10n.ent">
 %l10n.ent;
 
 <!ENTITY % l10n-common.ent
- PUBLIC "-//FreeBSD//ENTITIES FreeBSD L10N Common Entities//EN"
-        "http://www.FreeBSD.org/XML/www/share/xml/l10n.ent">
+ PUBLIC "-//FreeBSD//ENTITIES FreeBSD FreeBSD Language Specific Common Entities//EN"
+        "http://www.FreeBSD.org/XML/www/share/xml/l10n-common.ent">
 %l10n-common.ent;
 
 <!ENTITY % common.ent
diff --git a/sr_YU.ISO8859-2/share/xml/catalog.xml b/sr_YU.ISO8859-2/share/xml/catalog.xml
new file mode 100644
index 0000000000..d448b519d2
--- /dev/null
+++ b/sr_YU.ISO8859-2/share/xml/catalog.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
+        "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
+
+<!-- $FreeBSD$ -->
+
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+  <rewriteSystem systemIdStartString="http://www.FreeBSD.org/XML/www/lang/"
+                 rewritePrefix="../../"/>
+  <rewriteURI uriStartString="http://www.FreeBSD.org/XML/www/lang/"
+              rewritePrefix="../../"/>
+
+  <public publicId="-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
+        uri="l10n.ent" />
+  <public
+        publicId="-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//EN"
+        uri="entities.ent" />
+</catalog>
diff --git a/sr_YU.ISO8859-2/share/xml/entities.ent b/sr_YU.ISO8859-2/share/xml/entities.ent
index 04c582d0f3..e00d625047 100644
--- a/sr_YU.ISO8859-2/share/xml/entities.ent
+++ b/sr_YU.ISO8859-2/share/xml/entities.ent
@@ -4,9 +4,6 @@
 <!ENTITY % freebsd PUBLIC "-//FreeBSD//ENTITIES DocBook Miscellaneous FreeBSD Entities//EN"
 	"nonexistent">
 %freebsd;
-<!ENTITY % l10n PUBLIC "-//FreeBSD//ENTITIES DocBook Language Specific Entities//EN"
-	"l10n.ent">
-%l10n;
 <!ENTITY % mailing-lists PUBLIC "-//FreeBSD//ENTITIES DocBook Mailing List Entities//EN"
 	"nonexistent">
 %mailing-lists;
diff --git a/tr_TR.ISO8859-9/share/xml/catalog.xml b/tr_TR.ISO8859-9/share/xml/catalog.xml
index a3feec86ca..0417d6c356 100644
--- a/tr_TR.ISO8859-9/share/xml/catalog.xml
+++ b/tr_TR.ISO8859-9/share/xml/catalog.xml
@@ -10,6 +10,9 @@
   <rewriteURI uriStartString="http://www.FreeBSD.org/XML/www/lang/"
               rewritePrefix="../../"/>
 
+  <public
+        publicId="-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
+        uri="l10n.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//EN"
         uri="entities.ent" />
diff --git a/tr_TR.ISO8859-9/share/xml/entities.ent b/tr_TR.ISO8859-9/share/xml/entities.ent
index 04c582d0f3..e00d625047 100644
--- a/tr_TR.ISO8859-9/share/xml/entities.ent
+++ b/tr_TR.ISO8859-9/share/xml/entities.ent
@@ -4,9 +4,6 @@
 <!ENTITY % freebsd PUBLIC "-//FreeBSD//ENTITIES DocBook Miscellaneous FreeBSD Entities//EN"
 	"nonexistent">
 %freebsd;
-<!ENTITY % l10n PUBLIC "-//FreeBSD//ENTITIES DocBook Language Specific Entities//EN"
-	"l10n.ent">
-%l10n;
 <!ENTITY % mailing-lists PUBLIC "-//FreeBSD//ENTITIES DocBook Mailing List Entities//EN"
 	"nonexistent">
 %mailing-lists;
diff --git a/zh_CN.GB2312/share/xml/catalog.xml b/zh_CN.GB2312/share/xml/catalog.xml
index 0b06d43c89..d947212956 100644
--- a/zh_CN.GB2312/share/xml/catalog.xml
+++ b/zh_CN.GB2312/share/xml/catalog.xml
@@ -10,11 +10,11 @@
   <rewriteURI uriStartString="http://www.FreeBSD.org/XML/www/lang/"
               rewritePrefix="../../"/>
 
+  <public publicId="-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
+        uri="l10n.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//EN"
         uri="entities.ent" />
-  <public publicId="-//FreeBSD//ENTITIES FreeBSD L10N Entities//EN"
-        uri="l10n.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES FreeBSD Release L10N Entities//EN"
         uri="release.l10n.ent" />
diff --git a/zh_CN.GB2312/share/xml/entities.ent b/zh_CN.GB2312/share/xml/entities.ent
index 30ba3b65f2..61435aa5b3 100644
--- a/zh_CN.GB2312/share/xml/entities.ent
+++ b/zh_CN.GB2312/share/xml/entities.ent
@@ -1,8 +1,5 @@
 <!-- $FreeBSD$ -->
 
-<!ENTITY % l10n PUBLIC "-//FreeBSD//ENTITIES DocBook Language Specific Entities//EN"
-	"l10n.ent">
-%l10n;
 <!ENTITY % freebsd PUBLIC "-//FreeBSD//ENTITIES DocBook Miscellaneous FreeBSD Entities//EN"
 	"nonexistent">
 %freebsd;
diff --git a/zh_TW.Big5/share/xml/catalog.xml b/zh_TW.Big5/share/xml/catalog.xml
index dd54826205..8aff2e2622 100644
--- a/zh_TW.Big5/share/xml/catalog.xml
+++ b/zh_TW.Big5/share/xml/catalog.xml
@@ -10,11 +10,11 @@
   <rewriteURI uriStartString="http://www.FreeBSD.org/XML/www/lang/"
               rewritePrefix="../../"/>
 
+  <public publicId="-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
+        uri="l10n.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//EN"
         uri="entities.ent" />
-  <public publicId="-//FreeBSD//ENTITIES FreeBSD L10N Entities//EN"
-        uri="l10n.ent" />
   <public
         publicId="-//FreeBSD//ENTITIES FreeBSD Release L10N Entities//EN"
         uri="release.l10n.ent" />
diff --git a/zh_TW.Big5/share/xml/entities.ent b/zh_TW.Big5/share/xml/entities.ent
index 31be33abe7..3129e5da62 100644
--- a/zh_TW.Big5/share/xml/entities.ent
+++ b/zh_TW.Big5/share/xml/entities.ent
@@ -1,8 +1,5 @@
 <!-- $FreeBSD$ -->
 
-<!ENTITY % l10n PUBLIC "-//FreeBSD//ENTITIES DocBook Language Specific Entities//EN"
-	"l10n.ent">
-%l10n;
 <!ENTITY % freebsd PUBLIC "-//FreeBSD//ENTITIES DocBook Miscellaneous FreeBSD Entities//EN"
 	"nonexistent">
 %freebsd;