[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg-devel
Subject:    [PATCH v2 1/3] nls: restructure charts as a single article with
From:       Gaetan Nadon <memsize () videotron ! ca>
Date:       2011-07-29 1:39:31
Message-ID: 1311903573-26281-1-git-send-email-memsize () videotron ! ca
[Download RAW message or body]

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@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

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic