From: John Darrington Date: Thu, 8 Jul 2010 13:24:11 +0000 (+0200) Subject: Replace unknown XML entities with their numerical counterpart. X-Git-Tag: sav-api~160 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp;a=commitdiff_plain;h=3618ffee49d9f9169c9fd48820ed9f949ac83e72 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 --- diff --git a/doc/automake.mk b/doc/automake.mk index b31aa769b4..af99930f87 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)