The HTML pages are currently validated against an XHTML 1.0 DTD.
This makes it impossible to take advantage of features that are
introduced in HTML 5, because they'll fail validation.

There is intentionally no DTD defined for HTML 5, so there's no
alternative to XHTML 1.0 DTD that we could switch to. The only
options are to stick with XHTML 1.0 forever, or drop the DTD
validation, and we pick the latter.

Signed-off-by: Daniel P. Berrange <berra...@redhat.com>
---
 .travis.yml                  |  1 -
 docs/Makefile.am             | 18 +++++-------------
 libvirt.spec.in              |  1 -
 m4/virt-external-programs.m4 |  1 -
 4 files changed, 5 insertions(+), 16 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 5a3e76510..f05ba8454 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -38,7 +38,6 @@ addons:
       - libapparmor-dev
       - dnsmasq-base
       - librbd-dev
-      - w3c-dtd-xhtml
 
 notifications:
   irc:
diff --git a/docs/Makefile.am b/docs/Makefile.am
index e32758f4a..f478d9505 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -260,14 +260,10 @@ MAINTAINERCLEANFILES += \
            || { rm $@ && exit 1; }; fi
 
 %.html: %.html.tmp
-       @if test -x $(XMLLINT) && test -x $(XMLCATALOG) ; then \
-         if $(XMLCATALOG) '$(XML_CATALOG_FILE)' \
-           "-//W3C//DTD XHTML 1.0 Strict//EN" > /dev/null ; then \
+       @if test -x $(XMLLINT) ; then \
          echo "Validating $@" ; \
-         SGML_CATALOG_FILES='$(XML_CATALOG_FILE)' \
-         $(XMLLINT) --catalogs --nonet --format --valid $< > $(srcdir)/$@ \
-         || { rm $(srcdir)/$@ && exit 1; }; \
-         else echo "missing XHTML1 DTD"; cat $< > $(srcdir)/$@ ; fi ; fi
+         $(XMLLINT) --nonet --format $< > $(srcdir)/$@ \
+         || { rm $(srcdir)/$@ && exit 1; }; fi
 
 %.php.tmp: %.php.in site.xsl page.xsl
        @if [ -x $(XSLTPROC) ] ; then \
@@ -290,12 +286,8 @@ html/index.html: libvirt-api.xml newapi.xsl page.xsl 
$(APIBUILD_STAMP)
          $(XSLTPROC) --nonet -o $(srcdir)/ \
          --stringparam builddir '$(abs_top_builddir)' \
          $(srcdir)/newapi.xsl $(srcdir)/libvirt-api.xml ; fi && \
-       if test -x $(XMLLINT) && test -x $(XMLCATALOG) ; then \
-         if $(XMLCATALOG) '$(XML_CATALOG_FILE)' "-//W3C//DTD XHTML 1.0 
Strict//EN" \
-           > /dev/null ; then \
-         SGML_CATALOG_FILES='$(XML_CATALOG_FILE)' \
-         $(XMLLINT) --catalogs --nonet --valid --noout $(srcdir)/html/*.html ; 
\
-         else echo "missing XHTML1 DTD"; cat $< > $(srcdir)/$@ ; fi ; fi
+       if test -x $(XMLLINT) ; then \
+         $(XMLLINT) --nonet --noout $(srcdir)/html/*.html ; fi
 
 $(addprefix $(srcdir)/,$(devhelphtml)): $(srcdir)/libvirt-api.xml $(devhelpxsl)
        $(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \
diff --git a/libvirt.spec.in b/libvirt.spec.in
index b074bd171..d1cff4caf 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -301,7 +301,6 @@ BuildRequires: systemd-units
 BuildRequires: xen-devel
 %endif
 BuildRequires: libxml2-devel
-BuildRequires: xhtml1-dtds
 BuildRequires: libxslt
 BuildRequires: readline-devel
 BuildRequires: ncurses-devel
diff --git a/m4/virt-external-programs.m4 b/m4/virt-external-programs.m4
index f2f62f492..4a10c85ad 100644
--- a/m4/virt-external-programs.m4
+++ b/m4/virt-external-programs.m4
@@ -24,7 +24,6 @@ AC_DEFUN([LIBVIRT_CHECK_EXTERNAL_PROGRAMS], [
 
   dnl Miscellaneous external programs.
   AC_PATH_PROG([XMLLINT], [xmllint], [/usr/bin/xmllint])
-  AC_PATH_PROG([XMLCATALOG], [xmlcatalog], [/usr/bin/xmlcatalog])
   AC_PATH_PROG([XSLTPROC], [xsltproc], [/usr/bin/xsltproc])
   AC_PATH_PROG([AUGPARSE], [augparse], [/usr/bin/augparse])
   AC_PROG_MKDIR_P
-- 
2.13.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to