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: v0.7.6~340 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3618ffee49d9f9169c9fd48820ed9f949ac83e72;p=pspp-builds.git 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 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)