[PATCH v2 1/3] nls: restructure charts as a single article with sections
Gaetan Nadon
memsize at videotron.ca
Thu Jul 28 18:39:31 PDT 2011
Looks more like a real article with a toc rather than individual
web pages. Looks nicer in pdf.
Each locale is a "section" rather than an "article".
Using XInclude to aggregate xml source files gets you the toc for free.
The single document is over 600 pages while there were 62 separate
documents previously. FOP version 1.0 is required to handle missing
character like capital sharp s.
Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
nls/Makefile.am | 3 ++-
nls/compose-chart.pl | 19 +++++++++----------
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/nls/Makefile.am b/nls/Makefile.am
index cabaf40..94019a7 100644
--- a/nls/Makefile.am
+++ b/nls/Makefile.am
@@ -129,7 +129,7 @@ TESTS_ENVIRONMENT = $(PERL)
TESTS = $(srcdir)/compose-check.pl
COMPOSE_CHARTS = $(locales:%=%/Compose.xml)
-doc_sources += $(locales:%=Compose/%.xml)
+nodist_noinst_DATA = $(locales:%=Compose/%.xml)
CLEANFILES += $(COMPOSE_CHARTS) $(doc_sources)
XMLTO_FLAGS += -o $(@D)
@@ -139,6 +139,7 @@ XMLTO_FLAGS += -o $(@D)
--locale="$(@D)" --output="$@" $<
Compose/%.xml: %/Compose.xml
+ @$(MKDIR_P) $(@D)
$(AM_V_GEN)cp $< $@
endif HAVE_PERL
diff --git a/nls/compose-chart.pl b/nls/compose-chart.pl
index c901e70..053c860 100755
--- a/nls/compose-chart.pl
+++ b/nls/compose-chart.pl
@@ -83,13 +83,13 @@ if ($make_index) {
q(<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"),
q( "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">),
q(<article id="compose-index">),
- q(<simplesect>),
- q(<title>Xlib Compose Key Charts</title>),
- q(<simplelist type='horiz' columns='3'>),
- ( map { qq(<member><ulink url="$_.html">$_</ulink></member>) }
+ q( <articleinfo>),
+ q( <title>Xlib Compose Key Charts</title>),
+ q( </articleinfo>),
+ ( map { qq( <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="$_.xml">\
+ <xi:fallback><section><title>$_</title><para></para></section></xi:fallback>\
+ </xi:include>) }
@ARGV ),
- q(</simplelist>),
- q(</simplesect>),
q(</article>),
"\n"
);
@@ -210,10 +210,9 @@ sub make_compose_chart {
print $OUTPUT
join ("\n",
qq(<?xml version="1.0" encoding="$charset" ?>),
- q(<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"),
+ q(<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"),
q( "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">),
- qq(<article id="$locale_name">),
- q(<simplesect>),
+ qq(<section id="$locale_name">),
qq(<title>Xlib Compose Keys for $locale_name</title>),
q(<para>Applications using Xlib input handling should recognize),
q( these compose key sequences in locales using the),
@@ -290,7 +289,7 @@ sub make_compose_chart {
qq(This compose table defines no sequences of its own.),
qq(</emphasis></para>\n);
}
- print $OUTPUT "</simplesect>\n</article>\n";
+ print $OUTPUT "</section>\n";
close $OUTPUT or die "Couldn't write $output_filename: $!";
--
1.7.4.1
More information about the xorg-devel
mailing list