From 3618ffee49d9f9169c9fd48820ed9f949ac83e72 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Thu, 8 Jul 2010 15:24:11 +0200 Subject: [PATCH] Replace unknown XML entities with their numerical counterpart. Texinfo seems to produce XML entities (such as ©) which are not valid (although they are valid for HTML). We work around such problems by post-processing with sed. Here, we replace these unknown entities with their numeric counterparts. Such is the advice given at http://www.dwheeler.com/essays/quotes-in-html.html --- doc/automake.mk | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/automake.mk b/doc/automake.mk index b31aa769..af99930f 100644 --- a/doc/automake.mk +++ b/doc/automake.mk @@ -56,7 +56,18 @@ $(srcdir)/doc/pspp.xml: doc/pspp.texinfo $(doc_pspp_TEXINFOS) @$(MKDIR_P) doc $(MAKEINFO) $(AM_MAKEINFOFLAGS) --docbook -I $(top_srcdir) \ $(top_srcdir)/doc/pspp.texinfo -o - \ - | $(SED) 's/Time-&-Date/Time-\&-Date/g' > $@ + | $(SED) -e 's/Time-&-Date/Time-\&-Date/g' \ + -e 's/“/\“/g' \ + -e 's/”/\”/g' \ + -e 's/‘/\‘/g' \ + -e 's/’/\’/g' \ + -e 's/—/\—/g' \ + -e 's/–/\′/g' \ + -e 's/©/\©/g' \ + -e 's/−/\−/g' \ + -e 's/…/\…/g' \ + -e 's/././g' \ + > $@ $(XMLLINT) --output /dev/null $@ 2>&1 2> /dev/null || ( $(RM) $@ && false ) docbookdir = $(docdir) -- 2.30.2