diff --git a/en_US.ISO8859-1/books/handbook/Makefile b/en_US.ISO8859-1/books/handbook/Makefile
index a439feaba6..43adb3b130 100644
--- a/en_US.ISO8859-1/books/handbook/Makefile
+++ b/en_US.ISO8859-1/books/handbook/Makefile
@@ -197,19 +197,6 @@ book.pdf: book.ps
 pgpkeyring: pgpkeys/chapter.sgml
 	@${JADE} -V nochunks ${JADEOPTS} -d ${DSLPGP} -t sgml ${MASTERDOC}
 
-DOC_PREFIX?= ${.CURDIR}/../../..
-
-.for p in ftp cvsup
-mirrors/chapter.sgml.${p}.inc: ${DOC_PREFIX}/share/sgml/mirrors.xml ${DOC_PREFIX}/share/sgml/mirrors.xsl
-	${XSLTPROC} ${XSLTPROCOPTS} --param 'proto' "'$p'" \
-	    ${DOC_PREFIX}/share/sgml/mirrors.xsl \
-	    ${DOC_PREFIX}/share/sgml/mirrors.xml \
-	    | sed -e "s,<\([^ >]*\)\([^>]*\)/>,<\1\2></\1>,;s,</anchor>,," > $@
-SRCS+= mirrors/chapter.sgml.${p}.inc
-CLEANFILES+= mirrors/chapter.sgml.${p}.inc
-.endfor
-
-
 #
 # Handbook-specific variables
 #
@@ -217,4 +204,40 @@ CLEANFILES+= mirrors/chapter.sgml.${p}.inc
 JADEFLAGS+=	-V withpgpkeys
 .endif
 
+DOC_PREFIX?= ${.CURDIR}/../../..
+
+.for p in ftp cvsup
+SRCS+= mirrors.sgml.${p}.inc
+CLEANFILES+= mirrors.sgml.${p}.inc
+CLEANFILES+= mirrors.sgml.${p}.inc.tmp
+.endfor
+
+SRCS+= eresources.sgml.www.inc
+CLEANFILES+= eresources.sgml.www.inc
+CLEANFILES+= eresources.sgml.www.inc.tmp
+
 .include "${DOC_PREFIX}/share/mk/doc.project.mk"
+
+.for p in ftp cvsup
+mirrors.sgml.${p}.inc: ${XML_MIRRORS} ${XSL_MIRRORS}
+	${XSLTPROC} ${XSLTPROCOPTS} \
+	    -o $@.tmp \
+	    --param 'transtable.xml' "'${XML_TRANSTABLE}'" \
+	    --param 'proto' "'$p'" \
+	    --param 'target' "'handbook/mirrors/chapter.sgml'" \
+	    ${XSL_MIRRORS} ${XML_MIRRORS}
+	${SED} -e 's,<\([^ >]*\)\([^>]*\)/>,<\1\2></\1>,;s,</anchor>,,'\
+	    < $@.tmp > $@ || (${RM} -f $@ && false)
+	${RM} -f $@.tmp
+.endfor
+
+eresources.sgml.www.inc: ${XML_MIRRORS} ${XSL_MIRRORS}
+	${XSLTPROC} ${XSLTPROCOPTS} \
+	    -o $@.tmp \
+	    --param 'transtable.xml' "'${XML_TRANSTABLE}'" \
+	    --param 'proto' "'http'" \
+	    --param 'target' "'handbook/eresources/chapter.sgml'" \
+	    ${XSL_MIRRORS} ${XML_MIRRORS}
+	${SED} -e 's,<\([^ >]*\)\([^>]*\)/>,<\1\2></\1>,;s,</anchor>,,'\
+	    < $@.tmp > $@ || (${RM} -f $@ && false)
+	${RM} -f $@.tmp
diff --git a/en_US.ISO8859-1/books/handbook/chapters.ent b/en_US.ISO8859-1/books/handbook/chapters.ent
index 90a8980d46..fb2d7090cd 100644
--- a/en_US.ISO8859-1/books/handbook/chapters.ent
+++ b/en_US.ISO8859-1/books/handbook/chapters.ent
@@ -39,11 +39,12 @@
 
 <!-- Part three (appendices) -->
 <!ENTITY chap.mirrors			SYSTEM "mirrors/chapter.sgml">
-<!ENTITY chap.mirrors.ftp.inc		SYSTEM "mirrors/chapter.sgml.ftp.inc">
-<!ENTITY chap.mirrors.cvsup.inc		SYSTEM "mirrors/chapter.sgml.cvsup.inc">
+<!ENTITY chap.mirrors.ftp.inc		SYSTEM "mirrors.sgml.ftp.inc">
+<!ENTITY chap.mirrors.cvsup.inc		SYSTEM "mirrors.sgml.cvsup.inc">
 
 <!ENTITY chap.bibliography		SYSTEM "bibliography/chapter.sgml">
 <!ENTITY chap.eresources		SYSTEM "eresources/chapter.sgml">
+<!ENTITY chap.eresources.www.inc	SYSTEM "eresources.sgml.www.inc">
 <!ENTITY chap.pgpkeys			SYSTEM "pgpkeys/chapter.sgml">
 <!ENTITY chap.index			SYSTEM "index.sgml">
 <!ENTITY chap.colophon			SYSTEM "colophon.sgml">
diff --git a/en_US.ISO8859-1/books/handbook/eresources/chapter.sgml b/en_US.ISO8859-1/books/handbook/eresources/chapter.sgml
index 7b9cd13225..7aa37d2f75 100644
--- a/en_US.ISO8859-1/books/handbook/eresources/chapter.sgml
+++ b/en_US.ISO8859-1/books/handbook/eresources/chapter.sgml
@@ -1443,411 +1443,7 @@
   <sect1 id="eresources-web">
     <title>World Wide Web Servers</title>
 
-    <itemizedlist>
-      <listitem>
-	<para><ulink url="http://www.FreeBSD.org/"></ulink> &mdash; Central Server.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.at.FreeBSD.org/"></ulink> &mdash; IPv6 Austria.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.dk.FreeBSD.org/"></ulink> &mdash; IPv6 Denmark.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.de.FreeBSD.org/"></ulink> &mdash; IPv6 Germany.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.jp.FreeBSD.org/www.FreeBSD.org/"></ulink> &mdash; IPv6 (6bone) Japan.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.no.FreeBSD.org/"></ulink> &mdash; IPv6 Norway.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www1.uk.FreeBSD.org/"></ulink> &mdash; IPv6 UK.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www4.us.FreeBSD.org/"></ulink> &mdash; IPv6 USA/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www5.us.FreeBSD.org/"></ulink> &mdash; IPv6 USA/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.ar.FreeBSD.org/"></ulink> &mdash; Argentina.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.au.FreeBSD.org/"></ulink> &mdash; Australia/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.au.FreeBSD.org/"></ulink> &mdash; Australia/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.at.FreeBSD.org/"></ulink> &mdash; Austria/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.at.FreeBSD.org/"></ulink> &mdash; Austria/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://freebsd.unixtech.be/"></ulink> &mdash; Belgium.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.br.FreeBSD.org/"></ulink> &mdash; Brazil/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.br.FreeBSD.org/www.freebsd.org/"></ulink> &mdash; Brazil/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www3.br.FreeBSD.org/"></ulink> &mdash; Brazil/3.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.bg.FreeBSD.org/"></ulink> &mdash; Bulgaria.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.ca.FreeBSD.org/"></ulink> &mdash; Canada/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.ca.FreeBSD.org/"></ulink> &mdash; Canada/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.cn.FreeBSD.org/"></ulink> &mdash; China.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.cz.FreeBSD.org/"></ulink> &mdash; Czech Republic.</para>
-      </listitem>
-
-       <listitem>
-	<para><ulink url="http://www.dk.FreeBSD.org/"></ulink> &mdash; Denmark/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www3.dk.FreeBSD.org/"></ulink> &mdash; Denmark/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.ee.FreeBSD.org/"></ulink> &mdash; Estonia.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.fi.FreeBSD.org/"></ulink> &mdash; Finland/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.fi.FreeBSD.org/"></ulink> &mdash; Finland/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.fr.FreeBSD.org/"></ulink> &mdash; France.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.de.FreeBSD.org/"></ulink> &mdash; Germany/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www1.de.FreeBSD.org/"></ulink> &mdash; Germany/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.de.FreeBSD.org/"></ulink> &mdash; Germany/3.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.gr.FreeBSD.org/"></ulink> &mdash; Greece/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.FreeBSD.gr/"></ulink> &mdash; Greece/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.hk.FreeBSD.org/"></ulink> &mdash; Hong Kong.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.hu.FreeBSD.org/"></ulink> &mdash; Hungary/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.hu.FreeBSD.org/"></ulink> &mdash; Hungary/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.is.FreeBSD.org/"></ulink> &mdash; Iceland.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.ie.FreeBSD.org/"></ulink> &mdash; Ireland/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.ie.FreeBSD.org/"></ulink> &mdash; Ireland/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.it.FreeBSD.org/"></ulink> &mdash; Italy/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.gufi.org/mirrors/www.freebsd.org/data/"></ulink> &mdash; Italy/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.jp.FreeBSD.org/www.FreeBSD.org/"></ulink> &mdash; Japan.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.kr.FreeBSD.org/"></ulink> &mdash; Korea/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.kr.FreeBSD.org/"></ulink> &mdash; Korea/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www3.kr.FreeBSD.org/"></ulink> &mdash; Korea/3.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.lv.FreeBSD.org/"></ulink> &mdash; Latvia.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.lt.FreeBSD.org/"></ulink> &mdash; Lithuania.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.nl.FreeBSD.org/"></ulink> &mdash; Netherlands/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.nl.FreeBSD.org/"></ulink> &mdash; Netherlands/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.nz.FreeBSD.org/"></ulink> &mdash; New Zealand.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.no.FreeBSD.org/"></ulink> &mdash; Norway/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.no.FreeBSD.org/"></ulink> &mdash; Norway/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.FreeBSD.org.ph/"></ulink> &mdash; Philippines.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.pl.FreeBSD.org/"></ulink> &mdash; Poland/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.pl.FreeBSD.org/"></ulink> &mdash; Poland/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.pt.FreeBSD.org/"></ulink> &mdash; Portugal/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www4.pt.FreeBSD.org/"></ulink> &mdash; Portugal/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www5.pt.FreeBSD.org/"></ulink> &mdash; Portugal/3.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.ro.FreeBSD.org/"></ulink> &mdash; Romania/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.ro.FreeBSD.org/"></ulink> &mdash; Romania/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www3.ro.FreeBSD.org/"></ulink> &mdash; Romania/3.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www4.ro.FreeBSD.org/"></ulink> &mdash; Romania/4.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.ru.FreeBSD.org/"></ulink> &mdash; Russia/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.ru.FreeBSD.org/"></ulink> &mdash; Russia/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www3.ru.FreeBSD.org/"></ulink> &mdash; Russia/3.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www4.ru.FreeBSD.org/"></ulink> &mdash; Russia/4.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.sm.FreeBSD.org/"></ulink> &mdash; San Marino.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.sg.FreeBSD.org/"></ulink> &mdash; Singapore.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.sk.FreeBSD.org/"></ulink> &mdash; Slovak Republic/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.sk.FreeBSD.org/"></ulink> &mdash; Slovak Republic/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.si.FreeBSD.org/"></ulink> &mdash; Slovenia/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.si.FreeBSD.org/"></ulink> &mdash; Slovenia/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.es.FreeBSD.org/"></ulink> &mdash; Spain/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.es.FreeBSD.org/"></ulink> &mdash; Spain/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www3.es.FreeBSD.org/"></ulink> &mdash; Spain/3.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.za.FreeBSD.org/"></ulink> &mdash; South Africa/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.za.FreeBSD.org/"></ulink> &mdash; South Africa/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.se.FreeBSD.org/"></ulink> &mdash; Sweden/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.se.FreeBSD.org/"></ulink> &mdash; Sweden/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.ch.FreeBSD.org/"></ulink> &mdash; Switzerland/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.ch.FreeBSD.org/"></ulink> &mdash; Switzerland/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.tw.FreeBSD.org/"></ulink> &mdash; Taiwan/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.tw.FreeBSD.org/"></ulink> &mdash; Taiwan/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www3.tw.FreeBSD.org/"></ulink> &mdash; Taiwan/3.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www4.tw.FreeBSD.org/"></ulink> &mdash; Taiwan/4.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.tr.FreeBSD.org/"></ulink> &mdash; Turkey/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.tr.FreeBSD.org/"></ulink> &mdash; Turkey/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.enderunix.org/freebsd/"></ulink> &mdash; Turkey/3.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.ua.FreeBSD.org/"></ulink> &mdash; Ukraine/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.ua.FreeBSD.org/"></ulink> &mdash; Ukraine/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www5.ua.FreeBSD.org/"></ulink> &mdash; Ukraine/3.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www4.ua.FreeBSD.org/"></ulink> &mdash; Ukraine/Crimea.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.uk.FreeBSD.org/"></ulink> &mdash; United Kingdom/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.uk.FreeBSD.org/"></ulink> &mdash; United Kingdom/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www3.uk.FreeBSD.org/"></ulink> &mdash; United Kingdom/3.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www4.uk.FreeBSD.org/"></ulink> &mdash; United Kingdom/4.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www1.uk.FreeBSD.org/"></ulink> &mdash; United Kingdom/5.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.us.FreeBSD.org/"></ulink> &mdash; USA/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www4.FreeBSD.org/"></ulink> &mdash; USA/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www5.FreeBSD.org/"></ulink> &mdash; USA/3.</para>
-      </listitem>
-    </itemizedlist>
+    &chap.eresources.www.inc;
   </sect1>
 
   <sect1 id="eresources-email">
diff --git a/ja_JP.eucJP/books/handbook/Makefile b/ja_JP.eucJP/books/handbook/Makefile
index fc28b32c8a..09079933e9 100644
--- a/ja_JP.eucJP/books/handbook/Makefile
+++ b/ja_JP.eucJP/books/handbook/Makefile
@@ -204,16 +204,6 @@ pgpkeyring: pgpkeys/chapter.sgml
 
 DOC_PREFIX?= ${.CURDIR}/../../..
 
-.for p in ftp cvsup
-mirrors/chapter.sgml.${p}.inc: ${DOC_PREFIX}/share/sgml/mirrors.xml ${DOC_PREFIX}/share/sgml/mirrors.xsl ${DOC_PREFIX}/ja_JP.eucJP/share/sgml/mirrors.xsl ${DOC_PREFIX}/ja_JP.eucJP/share/sgml/transtable.xsl ${DOC_PREFIX}/ja_JP.eucJP/share/sgml/transtable.xml
-	${XSLTPROC} ${XSLTPROCOPTS} --param 'proto' "'$p'" \
-	    ${DOC_PREFIX}/ja_JP.eucJP/share/sgml/mirrors.xsl \
-	    ${DOC_PREFIX}/share/sgml/mirrors.xml \
-	    | sed -e "s,<\([^ >]*\)\([^>]*\)/>,<\1\2></\1>,;s,</anchor>,," > $@
-SRCS+= mirrors/chapter.sgml.${p}.inc
-CLEANFILES+= mirrors/chapter.sgml.${p}.inc
-.endfor
-
 #
 # Handbook-specific variables
 #
@@ -222,4 +212,39 @@ JADEFLAGS+=	-V withpgpkeys
 .endif
 
 DOC_PREFIX?= ${.CURDIR}/../../..
+
+.for p in ftp cvsup
+SRCS+= mirrors.sgml.${p}.inc
+CLEANFILES+= mirrors.sgml.${p}.inc
+CLEANFILES+= mirrors.sgml.${p}.inc.tmp
+.endfor
+
+SRCS+= eresources.sgml.www.inc
+CLEANFILES+= eresources.sgml.www.inc
+CLEANFILES+= eresources.sgml.www.inc.tmp
+
 .include "${DOC_PREFIX}/share/mk/doc.project.mk"
+
+.for p in ftp cvsup
+mirrors.sgml.${p}.inc: ${XML_MIRRORS} ${XSL_MIRRORS}
+	${XSLTPROC} ${XSLTPROCOPTS} \
+	    -o $@.tmp \
+	    --param 'transtable.xml' "'${XML_TRANSTABLE}'" \
+	    --param 'proto' "'$p'" \
+	    --param 'target' "'handbook/mirrors/chapter.sgml'" \
+	    ${XSL_MIRRORS} ${XML_MIRRORS}
+	${SED} -e 's,<\([^ >]*\)\([^>]*\)/>,<\1\2></\1>,;s,</anchor>,,'\
+	    < $@.tmp > $@ || (${RM} -f $@ && false)
+	${RM} -f $@.tmp
+.endfor
+
+eresources.sgml.www.inc: ${XML_MIRRORS} ${XSL_MIRRORS}
+	${XSLTPROC} ${XSLTPROCOPTS} \
+	    -o $@.tmp \
+	    --param 'transtable.xml' "'${XML_TRANSTABLE}'" \
+	    --param 'proto' "'http'" \
+	    --param 'target' "'handbook/eresources/chapter.sgml'" \
+	    ${XSL_MIRRORS} ${XML_MIRRORS}
+	${SED} -e 's,<\([^ >]*\)\([^>]*\)/>,<\1\2></\1>,;s,</anchor>,,'\
+	    < $@.tmp > $@ || (${RM} -f $@ && false)
+	${RM} -f $@.tmp
diff --git a/ja_JP.eucJP/books/handbook/chapters.ent b/ja_JP.eucJP/books/handbook/chapters.ent
index 68aa4e0626..d0d5a1fa58 100644
--- a/ja_JP.eucJP/books/handbook/chapters.ent
+++ b/ja_JP.eucJP/books/handbook/chapters.ent
@@ -45,11 +45,12 @@
 
 <!-- Part three (appendices) -->
 <!ENTITY chap.mirrors			SYSTEM "mirrors/chapter.sgml">
-<!ENTITY chap.mirrors.ftp.inc		SYSTEM "mirrors/chapter.sgml.ftp.inc">
-<!ENTITY chap.mirrors.cvsup.inc		SYSTEM "mirrors/chapter.sgml.cvsup.inc">
+<!ENTITY chap.mirrors.ftp.inc		SYSTEM "mirrors.sgml.ftp.inc">
+<!ENTITY chap.mirrors.cvsup.inc		SYSTEM "mirrors.sgml.cvsup.inc">
 
 <!ENTITY chap.bibliography		SYSTEM "bibliography/chapter.sgml">
 <!ENTITY chap.eresources		SYSTEM "eresources/chapter.sgml">
+<!ENTITY chap.eresources.www.inc	SYSTEM "eresources.sgml.www.inc">
 <!ENTITY chap.pgpkeys			SYSTEM "pgpkeys/chapter.sgml">
 <!ENTITY chap.index			SYSTEM "index.sgml">
 <!ENTITY chap.colophon			SYSTEM "colophon.sgml">
diff --git a/ja_JP.eucJP/books/handbook/eresources/chapter.sgml b/ja_JP.eucJP/books/handbook/eresources/chapter.sgml
index 3d47476511..709e373284 100644
--- a/ja_JP.eucJP/books/handbook/eresources/chapter.sgml
+++ b/ja_JP.eucJP/books/handbook/eresources/chapter.sgml
@@ -1208,379 +1208,7 @@ help
   <sect1 id="eresources-web">
     <title>World Wide Web ������</title>
 
-    <itemizedlist>
-      <listitem>
-	<para><ulink url="http://www.FreeBSD.org/">
-	    http://www.FreeBSD.ORG/</ulink>
-	  &mdash; �ܲȤΥ�����.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.au.FreeBSD.org/">
-	    http://www.au.FreeBSD.org/</ulink>
-	  &mdash; �������ȥ�ꥢ/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.au.FreeBSD.org/">
-	    http://www.au.FreeBSD.org/</ulink>
-	  &mdash; �������ȥ�ꥢ/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www3.au.FreeBSD.org/">
-	    http://www.au.FreeBSD.org/</ulink>
-	  &mdash; �������ȥ�ꥢ/3.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://freebsd.itworks.com.au/">
-	    http://freebsd.itworks.com.au/</ulink>
-	  &mdash; �������ȥ�ꥢ/4.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.br.FreeBSD.org/www.freebsd.org/">
-	    http://www.au.FreeBSD.org/www.freebsd.org/</ulink>
-	  &mdash; �֥饸��/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.br.FreeBSD.org/www.freebsd.org/">
-	    http://www2.br.FreeBSD.org/www.freebsd.org/</ulink>
-	  &mdash; �֥饸��/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www3.br.FreeBSD.org/">
-	    http://www3.br.FreeBSD.org/</ulink>
-	  &mdash; �֥饸��/3.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.bg.FreeBSD.org/">
-	    http://www.bg.FreeBSD.org/</ulink>
-	  &mdash; �֥륬�ꥢ.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.ca.FreeBSD.org/">
-	    http://www.bg.FreeBSD.org/</ulink>
-	  &mdash; ���ʥ�/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.ca.FreeBSD.org/">
-	    http://www2.ca.FreeBSD.org/</ulink>
-	  &mdash; ���ʥ�/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www3.ca.FreeBSD.org/">
-	    http://www3.ca.FreeBSD.org/</ulink>
-	  &mdash; ���ʥ�/3.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.cn.FreeBSD.org/">
-	    http://www.cn.FreeBSD.org/</ulink>
-	  &mdash; ���.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.cz.FreeBSD.org/">
-	    http://www.cz.FreeBSD.org/</ulink>
-	  &mdash; ���������¹�.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.dk.FreeBSD.org/">
-	    http://www.dk.FreeBSD.org/</ulink>
-	  &mdash; �ǥ�ޡ���.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.ee.FreeBSD.org/">
-	    http://www.ee.FreeBSD.org/</ulink>
-	  &mdash; �����ȥ˥�.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.fi.FreeBSD.org/">
-	    http://www.fi.FreeBSD.org/</ulink>
-	  &mdash; �ե������.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.fr.FreeBSD.org/">
-	    http://www.fr.FreeBSD.org/</ulink>
-	  &mdash; �ե��.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.de.FreeBSD.org/">
-	    http://www.de.FreeBSD.org/</ulink>
-	  &mdash; �ɥ���/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www1.de.FreeBSD.org/">
-	    http://www1.de.FreeBSD.org/</ulink>
-	  &mdash; �ɥ���/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.de.FreeBSD.org/">
-	    http://www2.de.FreeBSD.org/</ulink>
-	  &mdash; �ɥ���/3.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.gr.FreeBSD.org/">
-	    http://www.gr.FreeBSD.org/</ulink>
-	  &mdash; ���ꥷ��.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.hu.FreeBSD.org/">
-	    http://www.hu.FreeBSD.org/</ulink>
-	  &mdash; �ϥ󥬥꡼.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.is.FreeBSD.org/">
-	    http://www.is.FreeBSD.org/</ulink>
-	  &mdash; ����������.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.ie.FreeBSD.org/">
-	    http://www.ie.FreeBSD.org/</ulink>
-	  &mdash; ���������.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.jp.FreeBSD.org/www.FreeBSD.org/">
-	    http://www.jp.FreeBSD.org/www.FreeBSD.org/</ulink>
-	  &mdash; ����.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.kr.FreeBSD.org/">
-	    http://www.kr.FreeBSD.org/</ulink>
-	  &mdash; �ڹ�/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.kr.FreeBSD.org/">
-	    http://www2.kr.FreeBSD.org/</ulink>
-	  &mdash; �ڹ�/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.lv.FreeBSD.org/">
-	    http://www.lv.FreeBSD.org/</ulink>
-	  &mdash; ��ȥ�����.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://rama.asiapac.net/freebsd/">
-	    http://rama.asiapac.net/freebsd/</ulink>
-	  &mdash; �ޥ졼����.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.nl.FreeBSD.org/">
-	    http://www.nl.FreeBSD.org/</ulink>
-	  &mdash; ������/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.nl.FreeBSD.org/">
-	    http://www2.nl.FreeBSD.org/</ulink>
-	  &mdash; ������/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.no.FreeBSD.org/">
-	    http://www.no.FreeBSD.org/</ulink>
-	  &mdash; �Υ륦����.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.nz.FreeBSD.org/">
-	    http://www.nz.FreeBSD.org/</ulink>
-	  &mdash; �˥塼��������.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.pl.FreeBSD.org/">
-	    http://www.pl.FreeBSD.org/</ulink>
-	  &mdash; �ݡ�����/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.pl.FreeBSD.org/">
-	    http://www2.pl.FreeBSD.org/</ulink>
-	  &mdash; �ݡ�����/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.pt.FreeBSD.org/">
-	    http://www.pt.FreeBSD.org/</ulink>
-	  &mdash; �ݥ�ȥ���/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.pt.FreeBSD.org/">
-	    http://www2.pt.FreeBSD.org/</ulink>
-	  &mdash; �ݥ�ȥ���/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www3.pt.FreeBSD.org/">
-	    http://www3.pt.FreeBSD.org/</ulink>
-	  &mdash; �ݥ�ȥ���/3.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.ro.FreeBSD.org/">
-	    http://www.ro.FreeBSD.org/</ulink>
-	  &mdash; �롼�ޥ˥�.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.ru.FreeBSD.org/">
-	    http://www.ru.FreeBSD.org/</ulink>
-	  &mdash; ������/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.ru.FreeBSD.org/">
-	    http://www2.ru.FreeBSD.org/</ulink>
-	  &mdash; ������/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www3.ru.FreeBSD.org/">
-	    http://www3.ru.FreeBSD.org/</ulink>
-	  &mdash; ������/3.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www4.ru.FreeBSD.org/">
-	    http://www4.ru.FreeBSD.org/</ulink>
-	  &mdash; ������/4.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://freebsd.s1web.com/">
-	    http://freebsd.s1web.com/</ulink>
-	  &mdash; ���󥬥ݡ���.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.sk.FreeBSD.org/">
-	    http://www.sk.FreeBSD.org/</ulink>
-	  &mdash; ��������.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.si.FreeBSD.org/">
-	    http://www.si.FreeBSD.org/</ulink>
-	  &mdash; �����٥˥�.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.es.FreeBSD.org/">
-	    http://www.es.FreeBSD.org/</ulink>
-	  &mdash; ���ڥ���.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.za.FreeBSD.org/">
-	    http://www.za.FreeBSD.org/</ulink>
-	  &mdash; ��եꥫ/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.za.FreeBSD.org/">
-	    http://www2.za.FreeBSD.org/</ulink>
-	  &mdash; ��եꥫ/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.se.FreeBSD.org/">
-	    http://www.se.FreeBSD.org/</ulink>
-	  &mdash; ���������ǥ�.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.ch.FreeBSD.org/">
-	    http://www.ch.FreeBSD.org/</ulink>
-	  &mdash; ������.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.tw.FreeBSD.org/www.freebsd.org/data/">
-	    http://www.tw.FreeBSD.org/www.freebsd.org/data/</ulink>
-	  &mdash; ����.</para>
-      </listitem>
-      
-      <listitem>
-	<para><ulink url="http://www.tr.FreeBSD.org/">
-	    http://www.tr.FreeBSD.org/</ulink>
-	  &mdash; �ȥ륳.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.ua.FreeBSD.org/www.freebsd.org/">
-	    http://www.ua.FreeBSD.org/www.freebsd.org/</ulink>
-	  &mdash; �����饤��/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.ua.FreeBSD.org/">
-	    http://www2.ua.FreeBSD.org/</ulink>
-	  &mdash; �����饤��/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www4.ua.FreeBSD.org/">
-	    http://www4.ua.FreeBSD.org/</ulink>
-	  &mdash; �����饤��/����ߥ�.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www.uk.FreeBSD.org/">
-	    http://www.uk.FreeBSD.org/</ulink>
-	  &mdash; �����ꥹ/1.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.uk.FreeBSD.org/">
-            http://www2.uk.FreeBSD.org/</ulink>
-	  &mdash; �����ꥹ/2.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www3.uk.FreeBSD.org/">
-            http://www3.uk.FreeBSD.org/</ulink>
-	  &mdash; �����ꥹ/3.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www6.FreeBSD.org/">
-	    http://www6.FreeBSD.org/</ulink>
-	  &mdash; ����ꥫ/���쥴��.</para>
-      </listitem>
-
-      <listitem>
-	<para><ulink url="http://www2.FreeBSD.org/">
-	    http://www2.FreeBSD.org/</ulink>
-	  &mdash; ����ꥫ/�ƥ�����.</para>
-      </listitem>
-    </itemizedlist>
+    &chap.eresources.www.inc;
   </sect1>
 
   <sect1 id="eresources-email">
diff --git a/ja_JP.eucJP/share/sgml/mirrors.xsl b/ja_JP.eucJP/share/sgml/mirrors-local.xsl
similarity index 61%
rename from ja_JP.eucJP/share/sgml/mirrors.xsl
rename to ja_JP.eucJP/share/sgml/mirrors-local.xsl
index 6c07ca9d8c..e2803df186 100644
--- a/ja_JP.eucJP/share/sgml/mirrors.xsl
+++ b/ja_JP.eucJP/share/sgml/mirrors-local.xsl
@@ -3,20 +3,22 @@
 
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
 
-  <xsl:import href="../../../share/sgml/mirrors.xsl" />
-
-  <xsl:import href="./transtable.xsl" />
+  <!-- must point to master copy, doc/share/sgml/mirrors-master.xsl -->
+  <xsl:import href="../../../share/sgml/mirrors-master.xsl" />
 
   <xsl:output type="xml" encoding="euc-jp"
 	      omit-xml-declaration="yes"
 	      indent="yes"/>
 
-  <xsl:template name="contact">
+  <!-- these params should be externally bound. The values
+       here are not used actually -->
+  <xsl:param name="proto" select="''" />
+
+  <xsl:template name="mirrors-docbook-contact">
     <xsl:param name="email" value="'someone@somewhere'"/>
 
     <!-- for Japanese version -->
     <para>���꤬������ϡ����Υɥᥤ��Υۥ��ȥޥ���
         <email><xsl:value-of select="$email" /></email> ���ˤ��䤤��碌����������</para>
   </xsl:template>
-
 </xsl:stylesheet>
diff --git a/ja_JP.eucJP/share/sgml/transtable-local.xsl b/ja_JP.eucJP/share/sgml/transtable-local.xsl
new file mode 100644
index 0000000000..d1b0e7f6b7
--- /dev/null
+++ b/ja_JP.eucJP/share/sgml/transtable-local.xsl
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="euc-jp"?>
+<!-- $FreeBSD$ -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- must point to master copy, doc/share/sgml/transtable-master.xsl -->
+  <xsl:import href="../../../share/sgml/transtable-master.xsl" />
+
+  <xsl:output type="xml" encoding="euc-jp"
+	      indent="yes"/>
+
+  <!-- these params should be externally bound. The values
+       here are not used actually -->
+  <xsl:param name="transtable.xml" select="'./transtable.xml'" />
+  <xsl:param name="transtable-conv-element" select="''" />
+</xsl:stylesheet>
diff --git a/ja_JP.eucJP/share/sgml/transtable.xml b/ja_JP.eucJP/share/sgml/transtable.xml
index a1eef105a3..3318cd3a85 100644
--- a/ja_JP.eucJP/share/sgml/transtable.xml
+++ b/ja_JP.eucJP/share/sgml/transtable.xml
@@ -1,4 +1,18 @@
 <?xml version="1.0" encoding="euc-jp"?>
+<!-- $FreeBSD$ -->
+
+<!--
+
+  This is a translation table used in transtable-master.xsl.
+  For example:
+
+  <word>
+    <orig>word in English</orig>
+    <tran>word in your language</tran>
+  </word>
+
+-->
+
 <transtable>
   <cvs:keywords xmlns:cvs="http://www.FreeBSD.org/XML/CVS" version="1.0">
     <cvs:keyword name="freebsd">
@@ -7,247 +21,252 @@
   </cvs:keywords>
 
   <word>
-    <name lang="en">Primary Mirror Sites</name>
-    <name lang="ja">�켡�ߥ顼������</name>
+    <orig>Central Servers</orig>
+    <tran>���������</tran>
   </word>
 
   <word>
-    <name lang="en">Argentina</name>
-    <name lang="ja">���를�����</name>
+    <orig>Primary Mirror Sites</orig>
+    <tran>�켡�ߥ顼������</tran>
   </word>
 
   <word>
-    <name lang="en">Australia</name>
-    <name lang="ja">�������ȥ�ꥢ</name>
+    <orig>Argentina</orig>
+    <tran>���를�����</tran>
   </word>
 
   <word>
-    <name lang="en">Austria</name>
-    <name lang="ja">�������ȥꥢ</name>
+    <orig>Australia</orig>
+    <tran>�������ȥ�ꥢ</tran>
   </word>
 
   <word>
-    <name lang="en">Belgium</name>
-    <name lang="ja">�٥륮��</name>
+    <orig>Austria</orig>
+    <tran>�������ȥꥢ</tran>
   </word>
 
   <word>
-    <name lang="en">Brazil</name>
-    <name lang="ja">�֥饸��</name>
+    <orig>Belgium</orig>
+    <tran>�٥륮��</tran>
   </word>
 
   <word>
-    <name lang="en">Bulgaria</name>
-    <name lang="ja">�֥륬�ꥢ</name>
+    <orig>Brazil</orig>
+    <tran>�֥饸��</tran>
   </word>
 
   <word>
-    <name lang="en">Canada</name>
-    <name lang="ja">���ʥ�</name>
+    <orig>Bulgaria</orig>
+    <tran>�֥륬�ꥢ</tran>
   </word>
 
   <word>
-    <name lang="en">China</name>
-    <name lang="ja">���</name>
+    <orig>Canada</orig>
+    <tran>���ʥ�</tran>
   </word>
 
   <word>
-    <name lang="en">Croatia</name>
-    <name lang="ja">����������</name>
+    <orig>China</orig>
+    <tran>���</tran>
   </word>
 
   <word>
-    <name lang="en">Czech Republic</name>
-    <name lang="ja">���������¹�</name>
+    <orig>Croatia</orig>
+    <tran>����������</tran>
   </word>
 
   <word>
-    <name lang="en">Denmark</name>
-    <name lang="ja">�ǥ�ޡ���</name>
+    <orig>Czech Republic</orig>
+    <tran>���������¹�</tran>
   </word>
 
   <word>
-    <name lang="en">Estonia</name>
-    <name lang="ja">�����ȥ˥�</name>
+    <orig>Denmark</orig>
+    <tran>�ǥ�ޡ���</tran>
   </word>
 
   <word>
-    <name lang="en">Finland</name>
-    <name lang="ja">�ե������</name>
+    <orig>Estonia</orig>
+    <tran>�����ȥ˥�</tran>
   </word>
 
   <word>
-    <name lang="en">France</name>
-    <name lang="ja">�ե��</name>
+    <orig>Finland</orig>
+    <tran>�ե������</tran>
   </word>
 
   <word>
-    <name lang="en">Germany</name>
-    <name lang="ja">�ɥ���</name>
+    <orig>France</orig>
+    <tran>�ե��</tran>
   </word>
 
   <word>
-    <name lang="en">Greece</name>
-    <name lang="ja">���ꥷ��</name>
+    <orig>Germany</orig>
+    <tran>�ɥ���</tran>
   </word>
 
   <word>
-    <name lang="en">Hong Kong</name>
-    <name lang="ja">���</name>
+    <orig>Greece</orig>
+    <tran>���ꥷ��</tran>
   </word>
 
   <word>
-    <name lang="en">Hungary</name>
-    <name lang="ja">�ϥ󥬥꡼</name>
+    <orig>Hong Kong</orig>
+    <tran>���</tran>
   </word>
 
   <word>
-    <name lang="en">Iceland</name>
-    <name lang="ja">����������</name>
+    <orig>Hungary</orig>
+    <tran>�ϥ󥬥꡼</tran>
   </word>
 
   <word>
-    <name lang="en">Ireland</name>
-    <name lang="ja">���������</name>
+    <orig>Iceland</orig>
+    <tran>����������</tran>
   </word>
 
   <word>
-    <name lang="en">Italy</name>
-    <name lang="ja">�����ꥢ</name>
+    <orig>Ireland</orig>
+    <tran>���������</tran>
   </word>
 
   <word>
-    <name lang="en">Japan</name>
-    <name lang="ja">����</name>
+    <orig>Italy</orig>
+    <tran>�����ꥢ</tran>
   </word>
 
   <word>
-    <name lang="en">Korea</name>
-    <name lang="ja">�ڹ�</name>
+    <orig>Japan</orig>
+    <tran>����</tran>
   </word>
 
   <word>
-    <name lang="en">Kuwait</name>
-    <name lang="ja">����������</name>
+    <orig>Korea</orig>
+    <tran>�ڹ�</tran>
   </word>
 
   <word>
-    <name lang="en">Latvia</name>
-    <name lang="ja">��ȥӥ�</name>
+    <orig>Kuwait</orig>
+    <tran>����������</tran>
   </word>
 
   <word>
-    <name lang="en">Lithuania</name>
-    <name lang="ja">��ȥ��˥�</name>
-  </word>
-  
-  <word>
-    <name lang="en">Netherlands</name>
-    <name lang="ja">������</name>
+    <orig>Latvia</orig>
+    <tran>��ȥӥ�</tran>
   </word>
 
   <word>
-    <name lang="en">New Zealand</name>
-    <name lang="ja">�˥塼��������</name>
+    <orig>Lithuania</orig>
+    <tran>��ȥ��˥�</tran>
   </word>
 
   <word>
-    <name lang="en">Norway</name>
-    <name lang="ja">�Υ륦����</name>
+    <orig>Netherlands</orig>
+    <tran>������</tran>
   </word>
 
   <word>
-    <name lang="en">Philippines</name>
-    <name lang="ja">�ե���ԥ�</name>
+    <orig>New Zealand</orig>
+    <tran>�˥塼��������</tran>
   </word>
 
   <word>
-    <name lang="en">Poland</name>
-    <name lang="ja">�ݡ�����</name>
+    <orig>Norway</orig>
+    <tran>�Υ륦����</tran>
   </word>
 
   <word>
-    <name lang="en">Portugal</name>
-    <name lang="ja">�ݥ�ȥ���</name>
+    <orig>Philippines</orig>
+    <tran>�ե���ԥ�</tran>
   </word>
 
   <word>
-    <name lang="en">Romania</name>
-    <name lang="ja">�롼�ޥ˥�</name>
+    <orig>Poland</orig>
+    <tran>�ݡ�����</tran>
   </word>
 
   <word>
-    <name lang="en">Russia</name>
-    <name lang="ja">������</name>
+    <orig>Portugal</orig>
+    <tran>�ݥ�ȥ���</tran>
   </word>
 
   <word>
-    <name lang="en">San Marino</name>
-    <name lang="ja">����ޥ��</name>
+    <orig>Romania</orig>
+    <tran>�롼�ޥ˥�</tran>
   </word>
 
   <word>
-    <name lang="en">Saudi Arabia</name>
-    <name lang="ja">����������ӥ�</name>
+    <orig>Russia</orig>
+    <tran>������</tran>
   </word>
 
   <word>
-    <name lang="en">Singapore</name>
-    <name lang="ja">���󥬥ݡ���</name>
+    <orig>San Marino</orig>
+    <tran>����ޥ��</tran>
   </word>
 
   <word>
-    <name lang="en">Slovak Republic</name>
-    <name lang="ja">�����Х������¹�</name>
+    <orig>Saudi Arabia</orig>
+    <tran>����������ӥ�</tran>
   </word>
 
   <word>
-    <name lang="en">Slovenia</name>
-    <name lang="ja">�����٥˥�</name>
+    <orig>Singapore</orig>
+    <tran>���󥬥ݡ���</tran>
   </word>
 
   <word>
-    <name lang="en">South Africa</name>
-    <name lang="ja">��եꥫ</name>
+    <orig>Slovak Republic</orig>
+    <tran>�����Х������¹�</tran>
   </word>
 
   <word>
-    <name lang="en">Spain</name>
-    <name lang="ja">���ڥ���</name>
+    <orig>Slovenia</orig>
+    <tran>�����٥˥�</tran>
   </word>
 
   <word>
-    <name lang="en">Sweden</name>
-    <name lang="ja">���������ǥ�</name>
+    <orig>South Africa</orig>
+    <tran>��եꥫ</tran>
   </word>
 
   <word>
-    <name lang="en">Switzerland</name>
-    <name lang="ja">������</name>
+    <orig>Spain</orig>
+    <tran>���ڥ���</tran>
   </word>
 
   <word>
-    <name lang="en">Taiwan</name>
-    <name lang="ja">����</name>
+    <orig>Sweden</orig>
+    <tran>���������ǥ�</tran>
   </word>
 
   <word>
-    <name lang="en">Turkey</name>
-    <name lang="ja">�ȥ륳</name>
+    <orig>Switzerland</orig>
+    <tran>������</tran>
   </word>
 
   <word>
-    <name lang="en">Ukraine</name>
-    <name lang="ja">�����饤��</name>
+    <orig>Taiwan</orig>
+    <tran>����</tran>
   </word>
 
   <word>
-    <name lang="en">United Kingdom</name>
-    <name lang="ja">�����ꥹ</name>
+    <orig>Turkey</orig>
+    <tran>�ȥ륳</tran>
   </word>
 
   <word>
-    <name lang="en">USA</name>
-    <name lang="ja">����ꥫ�罰��</name>
+    <orig>Ukraine</orig>
+    <tran>�����饤��</tran>
+  </word>
+
+  <word>
+    <orig>United Kingdom</orig>
+    <tran>�����ꥹ</tran>
+  </word>
+
+  <word>
+    <orig>USA</orig>
+    <tran>����ꥫ�罰��</tran>
   </word>
 </transtable>
diff --git a/ja_JP.eucJP/share/sgml/transtable.xsl b/ja_JP.eucJP/share/sgml/transtable.xsl
deleted file mode 100644
index 47b0984b9d..0000000000
--- a/ja_JP.eucJP/share/sgml/transtable.xsl
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0"?>
-<!-- $FreeBSD$ -->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-  <xsl:output type="xml" encoding="euc-jp"
-	      omit-xml-declaration="yes"
-	      indent="yes"/>
-
-  <xsl:param name="transtable" select="'./transtable.xml'" />
-
-  <xsl:key name="transname" match="word" use="name" />
-
-  <xsl:template name="transtable">
-    <xsl:param name="name" value="'Japan'"/>
-    <xsl:for-each select="document($transtable)">
-      <xsl:choose>
-        <xsl:when test="key('transname', $name)">
-          <xsl:for-each select="key('transname', $name)">
-             <xsl:value-of select="name[@lang='ja']" />
-          </xsl:for-each>
-        </xsl:when>
-        <xsl:otherwise>
-           <xsl:value-of select="$name" />
-        </xsl:otherwise>
-      </xsl:choose>         
-    </xsl:for-each>
-  </xsl:template>
-
-<!-- for debug
-  <xsl:template match="/">
-    <xsl:call-template name="transtable">
-      <xsl:with-param name="name" select="'United Kingdom'" /> 
-    </xsl:call-template>
-  </xsl:template>
--->
-
-</xsl:stylesheet>
diff --git a/share/mk/doc.common.mk b/share/mk/doc.common.mk
new file mode 100644
index 0000000000..0c0c26c165
--- /dev/null
+++ b/share/mk/doc.common.mk
@@ -0,0 +1,120 @@
+#
+# $FreeBSD$
+#
+# This include file <doc.common.mk> provides targets and variables for
+# documents commonly used in doc/ and www/ tree.
+#
+
+.if defined(DOC_PREFIX) && !empty(DOC_PREFIX)
+WEB_PREFIX?=	${DOC_PREFIX}/../www
+.elif defined(WEB_PREFIX) && !empty(WEB_PREFIX)
+DOC_PREFIX?=	${WEB_PREFIX}/../doc
+.else
+.error "You must define either WEB_PREFIX or DOC_PREFIX!"
+.endif
+
+# ------------------------------------------------------------------------
+#
+# Work out the language and encoding used for this document.
+#
+# Liberal default of maximum of 10 directories below to find it.
+#
+
+DOC_PREFIX_NAME?=	doc
+WWW_PREFIX_NAME?=	www
+
+.if !defined(LANGCODE) || empty(LANGCODE)
+# Calculate LANGCODE.  Are we in doc/?
+LANGCODE:=	${.CURDIR}
+.for _ in 1 2 3 4 5 6 7 8 9 10
+.if !(${LANGCODE:H:T} == ${DOC_PREFIX_NAME})
+LANGCODE:=	${LANGCODE:H}
+.endif
+.endfor
+LANGCODE:=	${LANGCODE:T}
+.if (${LANGCODE} == .)
+# Recalculate LANGCODE.  We are in www/.
+LANGCODE:=	${.CURDIR}
+.for _ in 1 2 3 4 5 6 7 8 9 10
+.if !(${LANGCODE:H:T} == ${WWW_PREFIX_NAME})
+LANGCODE:=	${LANGCODE:H}
+.endif
+.endfor
+# We have a short name such as `en' now.
+# Recalculate from doc/.
+WWW_LANGCODE:=	${LANGCODE:T}
+LANGCODE:=	${LANGCODE:T}
+.if (${LANGCODE} != .)
+LANGCODE!=	${ECHO} ${DOC_PREFIX}/${WWW_LANGCODE}*
+.for _ in 1 2 3 4 5 6 7 8 9 10
+.if !(${LANGCODE:H:T} == ${DOC_PREFIX_NAME})
+LANGCODE:=	${LANGCODE:H}
+.endif
+.endfor
+LANGCODE:=	${LANGCODE:T}
+.endif
+.endif
+.endif
+
+# If we are in doc/, guess WWW_LANGCODE using LANGCODE.
+.if !defined(WWW_LANGCODE) || empty(WWW_LANGCODE)
+WWW_LANGCODE!=	${ECHO} ${WEB_PREFIX}/*
+WWW2_LANGCODE!=	${ECHO} ${WWW_LANGCODE:T} |\
+		${SED} -e 's,.*\(${LANGCODE:R:C,(..)_.*,\1,}[^. ]*\).*,\1,'
+.if ${WWW_LANGCODE:T} == ${WWW2_LANGCODE}
+WWW_LANGCODE:= .
+.else
+WWW_LANGCODE:= ${WWW2_LANGCODE}
+.endif
+.undef WWW2_LANGCODE
+.endif
+
+# ------------------------------------------------------------------------
+#
+# advisories.xml dependency.
+#
+
+#XML_ADVISORIES=		${WEB_PREFIX}/share/sgml/advisories.xml
+# use www/en version temporarily
+XML_ADVISORIES=		${WEB_PREFIX}/en/security/advisories.xml
+
+# ------------------------------------------------------------------------
+#
+# mirrors.xml dependency.
+#
+
+XML_MIRRORS_MASTER=	${DOC_PREFIX}/share/sgml/mirrors.xml
+XML_MIRRORS=		${.OBJDIR}/${DOC_PREFIX:S,^${.CURDIR}/,,}/${LANGCODE}/share/sgml/mirrors.xml
+
+XSL_MIRRORS_MASTER=	${DOC_PREFIX}/share/sgml/mirrors-master.xsl
+
+.if exists(${DOC_PREFIX}/${LANGCODE}/share/sgml/mirrors-local.xsl)
+XSL_MIRRORS=		${DOC_PREFIX}/${LANGCODE}/share/sgml/mirrors-local.xsl
+.else
+XSL_MIRRORS=		${DOC_PREFIX}/share/sgml/mirrors-local.xsl
+.endif
+
+XSL_TRANSTABLE_MASTER=	${DOC_PREFIX}/share/sgml/transtable-master.xsl
+
+.if exists(${DOC_PREFIX}/${LANGCODE}/share/sgml/transtable-local.xsl)
+XSL_TRANSTABLE=		${DOC_PREFIX}/${LANGCODE}/share/sgml/transtable-local.xsl
+.else
+XSL_TRANSTABLE=		${DOC_PREFIX}/share/sgml/transtable-local.xsl
+.endif
+
+.if exists(${DOC_PREFIX}/${LANGCODE}/share/sgml/transtable.xml)
+XML_TRANSTABLE=		${DOC_PREFIX}/${LANGCODE}/share/sgml/transtable.xml
+.else
+XML_TRANSTABLE=		${DOC_PREFIX}/share/sgml/transtable.xml
+.endif
+
+${XSL_MIRRORS}: ${XSL_MIRRORS_MASTER}
+
+${XML_MIRRORS}: ${XML_MIRRORS_MASTER} ${XSL_TRANSTABLE} ${XSL_TRANSTABLE_MASTER}
+	${MKDIR} -p ${@:H}
+	${XSLTPROC} ${XSLTPROCOPTS} -o $@ \
+	    --param 'transtable.xml' "'${XML_TRANSTABLE}'" \
+	    --param 'transtable-conv-element' "'country'" \
+	    ${XSL_TRANSTABLE} ${XML_MIRRORS_MASTER} || (${RM} -f $@ && exit 1)
+
+CLEANFILES+= ${XML_MIRRORS}
diff --git a/share/mk/doc.install.mk b/share/mk/doc.install.mk
index 52367afd27..2f70eda4be 100644
--- a/share/mk/doc.install.mk
+++ b/share/mk/doc.install.mk
@@ -104,22 +104,3 @@ COPY?=	-C
 # installation "script"
 INSTALL_DOCS?= \
 	${INSTALL} ${COPY} ${INSTALL_FLAGS} -o ${DOCOWN} -g ${DOCGRP} -m ${DOCMODE}
-
-# ------------------------------------------------------------------------
-#
-# Work out the language and encoding used for this document.
-#
-# Liberal default of maximum of 10 directories below to find it.
-#
-
-DOC_PREFIX_NAME?=	doc
-
-.if !defined(LANGCODE)
-LANGCODE:=	${.CURDIR}
-.for _ in 1 2 3 4 5 6 7 8 9 10
-.if !(${LANGCODE:H:T} == ${DOC_PREFIX_NAME})
-LANGCODE:=	${LANGCODE:H}
-.endif
-.endfor
-LANGCODE:=	${LANGCODE:T}
-.endif
diff --git a/share/mk/doc.project.mk b/share/mk/doc.project.mk
index 1eee172e12..bd23ef8ba3 100644
--- a/share/mk/doc.project.mk
+++ b/share/mk/doc.project.mk
@@ -48,6 +48,9 @@
 #	doc.subdir.mk	Subdirectory related configuration, including
 #			handling "obj" builds.
 #
+# 	doc.common.mk	targets and variables commonly used in doc/ and
+#			www/ tree.
+#
 # DOCFORMAT-specific make files, like:
 #
 #	doc.docbook.mk	Building and installing docbook documentation.
@@ -84,6 +87,9 @@ ISPELLOPTS?=	-l -p /usr/share/dict/freebsd ${ISPELLFLAGS}
 # be listed first).
 .include "doc.images.mk"
 
+# targets and variables commonly used in doc/ and www/ tree.
+.include "doc.common.mk"
+
 # Ownership information.
 .include "doc.install.mk"
 
diff --git a/share/sgml/README.mirrors b/share/sgml/README.mirrors
new file mode 100644
index 0000000000..82acafcb0f
--- /dev/null
+++ b/share/sgml/README.mirrors
@@ -0,0 +1,57 @@
+$FreeBSD$
+
+This is an instruction for use of the following files, which are used
+for both of www/ and doc/ tree:
+
+ mirrors.xml		database of FreeBSD mirror sites
+
+ mirrors-local.xsl	stylesheet to create localized version of mirrors.xml.
+ mirrors-master.xsl	"-master" is master, "-local" is slave.
+
+ transtable.xml		word-by-word basis translation table
+
+ transtable-local.xsl	stylesheet to copy and translate a xml document.
+ transtable-master.xsl	"-master" is master, "-local" is slave.
+
+* Notes for mirrors.xml maintainers
+
+  The elements are sorted in alphabetical order when the documents
+  are rendered.  So basically order of <entry> is not important, but
+  <entry> with role="primary" will be handled specially.  Currently
+  it is for the central servers and the primary mirror sites.
+
+* Notes for doc/ and www/ maintainers including translation teams:
+
+  Translators should not simply copy mirrors.xml, mirrors-*.xsl,
+  transtable.xml, and transtable-*.xsl in share/sgml to the
+  language dependent directory.  Instead, create "skeleton" *.xsl,
+  which just import the master stylesheet.  *-local.xsl in share/sgml
+  are "skeleton" for en_US.ISO8859-1, so you can start from these.
+  See ja_JP.eucJP/ for example.
+
+  Documents always use mirrors.xml in the language dependent directory.
+  This file is dynamically generated from share/sgml/mirorrs.xml, and it
+  is localized using transtable-local.xsl.  transtable-local.xsl refers
+  transtable.xml, a translation table for translating country name and
+  so on.  It should be in the language dependent directory, but if not exist,
+  share/sgml/transtable.xml (a dummy translation table) will be used.
+  Similarly, if there is not mirrors-local.xsl in the language dependent
+  directory, share/sgml/mirrors-local.xsl will be used.
+
+  That is:
+                          share/sgml           <langcode>/share/sgml
+  -----------------------------------------------------------------------
+   mirrors.xml            master copy           dynamically generated
+   mirrors-local.xsl      dummy                 this is used if exists
+   mirrors-master.xsl     used from -local.xsl  should not exist
+   transtable.xml         dummy                 this is used if exists
+   transtable-local.xsl   dummy                 this is used if exists
+   transtable-master.xsl  used from -local.xsl  should not exist
+  -----------------------------------------------------------------------
+
+  "dummy" means that it will be used when the localized version of it is
+  not available.  So the translation teams copy the "dummy" files,
+  and adjust them to the language (especially make sure "encoding" part).
+
+  If you add a document using mirrors.xml, use ${XML_MIRRORS} in the
+  Makefile.
diff --git a/share/sgml/mirrors-local.xsl b/share/sgml/mirrors-local.xsl
new file mode 100644
index 0000000000..617b776ad5
--- /dev/null
+++ b/share/sgml/mirrors-local.xsl
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- $FreeBSD$ -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- must point to master copy, doc/share/sgml/mirrors-master.xsl -->
+  <xsl:import href="./mirrors-master.xsl" />
+
+  <xsl:output type="xml" encoding="iso-8859-1"
+	      omit-xml-declaration="yes"
+	      indent="yes"/>
+
+  <!-- these params should be externally bound. The values
+       here are not used actually -->
+  <xsl:param name="proto" select="''" />
+</xsl:stylesheet>
diff --git a/share/sgml/mirrors-master.xsl b/share/sgml/mirrors-master.xsl
new file mode 100644
index 0000000000..56732730a6
--- /dev/null
+++ b/share/sgml/mirrors-master.xsl
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- $FreeBSD$ -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <xsl:output type="xml" encoding="iso-8859-1"
+	      omit-xml-declaration="yes"
+	      indent="yes"/>
+
+  <!-- these params should be externally bound. The values
+       here are not used actually -->
+  <xsl:param name="proto" select="''" />
+  <xsl:param name="target" select="''" />
+
+  <xsl:param name="mirrors-docbook-country-anchor-id" select="translate($target, '/.', '--')" />
+
+  <!--
+     templates available:
+
+        * "mirrors-docbook-contact"
+        * "mirrors-docbook-country-index-all"
+        * "mirrors-docbook-variablelist"
+        * "mirrors-docbook-itemizedlist"
+  -->
+
+  <xsl:template match="/mirrors">
+    <xsl:choose>
+      <xsl:when test="$target = 'handbook/mirrors/chapter.sgml'">
+	<xsl:call-template name="mirrors-docbook-country-index-all" />
+	<xsl:call-template name="mirrors-docbook-variablelist" />
+      </xsl:when>
+      <xsl:when test="$target = 'handbook/eresources/chapter.sgml'">
+	<xsl:call-template name="mirrors-docbook-country-index-all" />
+	<xsl:call-template name="mirrors-docbook-itemizedlist" />
+      </xsl:when>
+      <xsl:otherwise>
+	<xsl:value-of select="'*** processing error ***'" />
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <!-- template: "mirrors-docbook-contact" -->
+
+  <xsl:template name="mirrors-docbook-contact">
+    <xsl:param name="email" select="'someone@somewhere'"/>
+
+    <para>In case of problems, please contact the hostmaster
+      <email><xsl:value-of select="$email" /></email> for this domain.</para>
+  </xsl:template>
+
+  <!-- template: "mirrors-docbook-country-index-all" -->
+
+  <xsl:template name="mirrors-docbook-country-index-all">
+    <para>
+      <xsl:for-each select="entry[country/@role = 'primary' and
+	                    (url[contains(@proto, $proto)] or host[contains(@proto, $proto)])]">
+	<xsl:call-template name="mirrors-docbook-country-index" />
+      </xsl:for-each>
+
+      <xsl:for-each select="entry[country/@role != 'primary' and
+	                    (url[contains(@proto, $proto)] or host[contains(@proto, $proto)])]">
+	<xsl:sort select="country" />
+
+	<xsl:call-template name="mirrors-docbook-country-index" />
+      </xsl:for-each>
+    </para>
+  </xsl:template>
+
+  <xsl:template name="mirrors-docbook-country-index">
+    <link>
+      <xsl:attribute name="linkend">
+	<xsl:value-of select="concat($mirrors-docbook-country-anchor-id, '-', @id, '-', $proto)" />
+      </xsl:attribute>
+      <xsl:value-of select="country" />
+    </link>
+    <xsl:choose>
+      <xsl:when test='position() = last()'><xsl:text>.</xsl:text></xsl:when>
+      <xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <!-- template: "mirrors-docbook-variablelist" -->
+
+  <xsl:template name="mirrors-docbook-variablelist">
+    <variablelist>
+      <xsl:for-each select="entry[country/@role = 'primary' and
+	                    (url[contains(@proto, $proto)] or host[contains(@proto, $proto)])]">
+	<xsl:call-template name="mirrors-docbook-variablelist-entry" />
+      </xsl:for-each>
+
+      <xsl:for-each select="entry[country/@role != 'primary' and
+	                    (url[contains(@proto, $proto)] or host[contains(@proto, $proto)])]">
+	<xsl:sort select="country" />
+
+	<xsl:call-template name="mirrors-docbook-variablelist-entry" />
+      </xsl:for-each>
+    </variablelist>
+  </xsl:template>
+
+  <xsl:template name="mirrors-docbook-variablelist-entry">
+    <varlistentry>
+      <term>
+	<anchor>
+	  <xsl:attribute name="id">
+	    <xsl:value-of select="concat($mirrors-docbook-country-anchor-id, '-', @id, '-', $proto)" />
+	  </xsl:attribute>
+	</anchor>
+	<xsl:value-of select="country" />
+      </term>
+
+      <listitem>
+	<xsl:if test="$proto = 'ftp' and email">
+	  <xsl:call-template name="mirrors-docbook-contact">
+	    <xsl:with-param name="email" select="email" />
+	  </xsl:call-template>
+	</xsl:if>
+
+	<itemizedlist>
+	  <xsl:for-each select="child::*[contains(@proto, $proto)]">
+	    <listitem>
+	      <para>
+		<xsl:choose>
+		  <xsl:when test="self::url">
+		    <ulink>
+		      <xsl:attribute name="url"><xsl:value-of select="." /></xsl:attribute>
+		    </ulink>
+		  </xsl:when>
+		  <xsl:otherwise>
+		    <xsl:value-of select="." />
+		  </xsl:otherwise>
+		</xsl:choose>
+	      </para>
+	    </listitem>
+	  </xsl:for-each>
+	</itemizedlist>
+      </listitem>
+    </varlistentry>
+  </xsl:template>
+
+  <!-- template: "mirrors-docbook-itemizedlist" -->
+
+  <xsl:template name="mirrors-docbook-itemizedlist">
+    <itemizedlist>
+      <xsl:for-each select="entry[country/@role = 'primary' and
+	                    (url[contains(@proto, $proto)] or host[contains(@proto, $proto)])]">
+	<xsl:call-template name="mirrors-docbook-itemizedlist-listitem" />
+      </xsl:for-each>
+
+      <xsl:for-each select="entry[country/@role != 'primary' and
+	                    (url[contains(@proto, $proto)] or host[contains(@proto, $proto)])]">
+        <xsl:sort select="country" />
+
+	<xsl:call-template name="mirrors-docbook-itemizedlist-listitem" />
+      </xsl:for-each>
+    </itemizedlist>
+  </xsl:template>
+
+  <xsl:template name="mirrors-docbook-itemizedlist-listitem">
+    <listitem>
+      <anchor>
+	<xsl:attribute name="id">
+	  <xsl:value-of select="concat($mirrors-docbook-country-anchor-id, '-', @id, '-', $proto)" />
+	</xsl:attribute>
+      </anchor>
+
+      <para><xsl:value-of select="country" /></para>
+
+      <itemizedlist>
+	<xsl:for-each select="child::*[contains(@proto, $proto) and contains(@type, 'www')]">
+	  <xsl:if test="self::url">
+	    <listitem>
+	      <para>
+		<ulink>
+		  <xsl:attribute name="url"><xsl:value-of select="." /></xsl:attribute>
+		  <xsl:value-of select="." />
+		</ulink>
+	      </para>
+	    </listitem>
+	  </xsl:if>
+	</xsl:for-each>
+      </itemizedlist>
+    </listitem>
+  </xsl:template>
+</xsl:stylesheet>
diff --git a/share/sgml/mirrors.xml b/share/sgml/mirrors.xml
index a97971df40..e3d5d748f2 100644
--- a/share/sgml/mirrors.xml
+++ b/share/sgml/mirrors.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="iso-8859-1"?>
 <mirrors>
   <cvs:keywords xmlns:cvs="http://www.FreeBSD.org/XML/CVS" version="1.0">
     <cvs:keyword name="freebsd">
@@ -6,8 +6,15 @@
     </cvs:keyword>
   </cvs:keywords>
 
+  <entry id="central">
+    <country role="primary">Central Servers</country>
+    <url proto="http" type="www">http://www.FreeBSD.org/</url>
+    <url proto="ftp">ftp://ftp.FreBSD.org/pub/FreeBSD/</url>
+    <host proto="cvsup">cvsup.FreBSD.org</host>
+  </entry>
+
   <entry id="mirrors-primary">
-    <country>Primary Mirror Sites</country>
+    <country role="primary">Primary Mirror Sites</country>
     <url proto="ftp">ftp://ftp1.FreeBSD.org/pub/FreeBSD/</url>
     <url proto="ftp">ftp://ftp2.FreeBSD.org/pub/FreeBSD/</url>
     <url proto="ftp">ftp://ftp3.FreeBSD.org/pub/FreeBSD/</url>
diff --git a/share/sgml/mirrors.xsl b/share/sgml/mirrors.xsl
deleted file mode 100644
index e0e577510a..0000000000
--- a/share/sgml/mirrors.xsl
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0"?>
-<!-- $FreeBSD$ -->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-  <xsl:output type="xml" encoding="iso-8859-1"
-	      omit-xml-declaration="yes"
-	      indent="yes"/>
-  <!--
-    Notes for translators:
-
-    "transtable" and "contact" are available for localized documents.
-    Redefining these templates in the language dependent directory, you
-    can generate the results in the specific language.	For example,
-    please see ja_JP.eucJP/share/sgml/mirrors.xsl.
-  -->
-
-  <xsl:template name="transtable">
-    <xsl:param name="name" />
-
-    <!-- null for English version -->
-    <xsl:value-of select="$name" />
-  </xsl:template>
-
-  <xsl:template name="contact">
-    <xsl:param name="email" value="'someone@somewhere'"/>
-
-    <para>In case of problems, please contact the hostmaster
-      <email><xsl:value-of select="$email" /></email> for this domain.</para>
-  </xsl:template>
-
-  <xsl:template match="/mirrors">
-    <para>
-      <xsl:for-each select="entry[url[contains(@proto, $proto)] or host[contains(@proto, $proto)]]">
-	<link>
-	  <xsl:attribute name="linkend">
-	    <xsl:value-of select="concat(@id, '-', $proto)" />
-	  </xsl:attribute>
-	  <xsl:call-template name="transtable">
-	    <xsl:with-param name="name" select="country" />
-	  </xsl:call-template>
-	</link>
-	<xsl:choose>
-	  <xsl:when test='position() = last()'><xsl:text>.</xsl:text></xsl:when>
-	  <xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise>
-	</xsl:choose>
-      </xsl:for-each>
-    </para>
-
-    <variablelist>
-      <xsl:for-each select="entry[url[contains(@proto, $proto)] or host[contains(@proto, $proto)]]">
-	<varlistentry>
-	  <term>
-	    <anchor>
-	      <xsl:attribute name="id">
-		<xsl:value-of select="concat(@id, '-', $proto)" />
-	      </xsl:attribute>
-	    </anchor>
-	    <xsl:call-template name="transtable">
-	      <xsl:with-param name="name" select="country" />
-	    </xsl:call-template>
-	  </term>
-
-	  <listitem>
-	    <xsl:if test="$proto = 'ftp' and email">
-	      <xsl:call-template name="contact">
-		<xsl:with-param name="email" select="email" />
-	      </xsl:call-template>
-	    </xsl:if>
-
-	    <itemizedlist>
-	      <xsl:for-each select="child::*[contains(@proto, $proto)]">
-		<listitem>
-		  <para>
-		    <xsl:choose>
-		      <xsl:when test="self::url">
-			<ulink>
-			  <xsl:attribute name="url"><xsl:value-of select="." /></xsl:attribute>
-			</ulink>
-		      </xsl:when>
-		      <xsl:otherwise>
-			<xsl:value-of select="." />
-		      </xsl:otherwise>
-		    </xsl:choose>
-		  </para>
-		</listitem>
-	      </xsl:for-each>
-	    </itemizedlist>
-	  </listitem>
-	</varlistentry>
-      </xsl:for-each>
-    </variablelist>
-  </xsl:template>
-</xsl:stylesheet>
diff --git a/share/sgml/transtable-local.xsl b/share/sgml/transtable-local.xsl
new file mode 100644
index 0000000000..25ae67845f
--- /dev/null
+++ b/share/sgml/transtable-local.xsl
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- $FreeBSD$ -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- must point to master copy, doc/share/sgml/transtable-master.xsl -->
+  <xsl:import href="./transtable-master.xsl" />
+
+  <xsl:output type="xml"
+	      indent="yes"/>
+
+  <!-- these params should be externally bound. The values
+       here are not used actually -->
+  <xsl:param name="transtable.xml" select="'./transtable.xml'" />
+  <xsl:param name="transtable-conv-element" select="''" />
+</xsl:stylesheet>
diff --git a/share/sgml/transtable-master.xsl b/share/sgml/transtable-master.xsl
new file mode 100644
index 0000000000..2eda63fa62
--- /dev/null
+++ b/share/sgml/transtable-master.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- $FreeBSD$ -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <xsl:output type="xml" encoding="iso-8859-1"
+	      indent="yes"/>
+
+  <!-- these params should be externally bound. The values
+       here are not used actually -->
+  <xsl:param name="transtable.xml" select="'./transtable.xml'" />
+  <xsl:param name="transtable-conv-element" select="''" />
+
+  <xsl:key name="transtable-lookup-key" match="word" use="orig" />
+
+  <xsl:template name="transtable-lookup">
+    <xsl:param name="word" select="''"/>
+
+    <xsl:for-each select="document($transtable.xml)">
+      <xsl:choose>
+        <xsl:when test="key('transtable-lookup-key', $word)">
+          <xsl:for-each select="key('transtable-lookup-key', $word)">
+	    <xsl:value-of select="tran" />
+          </xsl:for-each>
+        </xsl:when>
+        <xsl:otherwise>
+	  <xsl:value-of select="$word" />
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:for-each>
+  </xsl:template>
+
+  <xsl:template match="*">
+    <xsl:copy>
+      <xsl:copy-of select="@*" />
+      <xsl:apply-templates />
+    </xsl:copy>
+  </xsl:template>
+
+  <xsl:template match="*[local-name() = $transtable-conv-element]">
+    <xsl:element name="{local-name(.)}" namespace="{namespace-uri(.)}">
+      <xsl:copy-of select="@*" />
+
+      <xsl:call-template name="transtable-lookup">
+        <xsl:with-param name="word" select="." />
+      </xsl:call-template>
+    </xsl:element>
+  </xsl:template>
+</xsl:stylesheet>
diff --git a/share/sgml/transtable.xml b/share/sgml/transtable.xml
new file mode 100644
index 0000000000..1d420bf067
--- /dev/null
+++ b/share/sgml/transtable.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- $FreeBSD$ -->
+
+<!--
+
+  This is a translation table used in transtable-master.xsl.
+  For example:
+
+  <word>
+    <orig>word in English)</orig>
+    <tran>word in your language</tran>
+  </word>
+
+-->
+
+<transtable>
+  <cvs:keywords xmlns:cvs="http://www.FreeBSD.org/XML/CVS" version="1.0">
+    <cvs:keyword name="freebsd">
+      $FreeBSD$
+    </cvs:keyword>
+  </cvs:keywords>
+
+<!--
+  <word>
+    <orig>Primary Mirror Sites</orig>
+    <tran></tran>
+  </word>
+-->
+
+</transtable>