Re: [libvirt] [PATCH] check for XHTML1 DTDs availability

2008-08-20 Thread Daniel Veillard
On Wed, Aug 13, 2008 at 03:50:10PM +0200, Chris Lalancette wrote:
> Daniel Veillard wrote:
> > On Wed, Aug 13, 2008 at 08:10:36AM -0400, Daniel Veillard wrote:
> >>   Well apparently the XSL output is post-processed by xmlling --valid 
> >> --format
> >> which then introduce a dependancy on the XHTML1 DTDs . If you don't have 
> >> them
> >> installed locally you will get validation error messages when building
> >> in docs and the output will diverge.
> >>
> >>   The simplest solution for you is probably to make sure you have XHTML1
> >> DTDs installed in your local XML catalog, which on RHEL/Fedora is as simple
> >> as having the package xhtml1-dtds installed on your machine(s).
> > 
> >   The patch enclosed adds detection for the XHTML1 dtds at runtime on the 
> > build machine, and should solve the problem of diverging docs, replace the
> > XML validity warnings by a more general message and add the requirement
> > when building the RPM. I guess this should solve the issue
> 
> Yes, that did it for me.  I like the warning message too; at least that gives
> someone a fighting chance of figuring out what to install if they do want to
> generate the docs for some reason.

  Okay, that's far from perfect but better than the status quo, so
  commited !

   thanks,

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard  | virtualization library  http://libvirt.org/
[EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/

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


Re: [libvirt] [PATCH] check for XHTML1 DTDs availability

2008-08-13 Thread Atsushi SAKAI
Hi, Daniel

  I need to set http_proxy on my environment.
(Sorry, since I need not set http_proxy since I use wget and cvs only)
But still stays large diffs on html 6 files.

drvqemu.html
formatnetwork.html
formatstorage.html
intro.html
news.html
remote.html

Thanks
Atsushi SAKAI



Daniel Veillard <[EMAIL PROTECTED]> wrote:

> On Wed, Aug 13, 2008 at 08:10:36AM -0400, Daniel Veillard wrote:
> >   Well apparently the XSL output is post-processed by xmlling --valid 
> > --format
> > which then introduce a dependancy on the XHTML1 DTDs . If you don't have 
> > them
> > installed locally you will get validation error messages when building
> > in docs and the output will diverge.
> > 
> >   The simplest solution for you is probably to make sure you have XHTML1
> > DTDs installed in your local XML catalog, which on RHEL/Fedora is as simple
> > as having the package xhtml1-dtds installed on your machine(s).
> 
>   The patch enclosed adds detection for the XHTML1 dtds at runtime on the 
> build machine, and should solve the problem of diverging docs, replace the
> XML validity warnings by a more general message and add the requirement
> when building the RPM. I guess this should solve the issue
> 
> Daniel
> 
> -- 
> Red Hat Virtualization group http://redhat.com/virtualization/
> Daniel Veillard  | virtualization library  http://libvirt.org/
> [EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
> http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/


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


Re: [libvirt] [PATCH] check for XHTML1 DTDs availability

2008-08-13 Thread Chris Lalancette
Daniel Veillard wrote:
> On Wed, Aug 13, 2008 at 08:10:36AM -0400, Daniel Veillard wrote:
>>   Well apparently the XSL output is post-processed by xmlling --valid 
>> --format
>> which then introduce a dependancy on the XHTML1 DTDs . If you don't have them
>> installed locally you will get validation error messages when building
>> in docs and the output will diverge.
>>
>>   The simplest solution for you is probably to make sure you have XHTML1
>> DTDs installed in your local XML catalog, which on RHEL/Fedora is as simple
>> as having the package xhtml1-dtds installed on your machine(s).
> 
>   The patch enclosed adds detection for the XHTML1 dtds at runtime on the 
> build machine, and should solve the problem of diverging docs, replace the
> XML validity warnings by a more general message and add the requirement
> when building the RPM. I guess this should solve the issue

Yes, that did it for me.  I like the warning message too; at least that gives
someone a fighting chance of figuring out what to install if they do want to
generate the docs for some reason.

+1

Chris Lalancette

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


Re: [libvirt] [PATCH] check for XHTML1 DTDs availability

2008-08-13 Thread Daniel Veillard
On Wed, Aug 13, 2008 at 08:10:36AM -0400, Daniel Veillard wrote:
>   Well apparently the XSL output is post-processed by xmlling --valid --format
> which then introduce a dependancy on the XHTML1 DTDs . If you don't have them
> installed locally you will get validation error messages when building
> in docs and the output will diverge.
> 
>   The simplest solution for you is probably to make sure you have XHTML1
> DTDs installed in your local XML catalog, which on RHEL/Fedora is as simple
> as having the package xhtml1-dtds installed on your machine(s).

  The patch enclosed adds detection for the XHTML1 dtds at runtime on the 
build machine, and should solve the problem of diverging docs, replace the
XML validity warnings by a more general message and add the requirement
when building the RPM. I guess this should solve the issue

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard  | virtualization library  http://libvirt.org/
[EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/
Index: configure.in
===
RCS file: /data/cvs/libxen/configure.in,v
retrieving revision 1.158
diff -u -r1.158 configure.in
--- configure.in29 Jul 2008 08:42:56 -  1.158
+++ configure.in13 Aug 2008 12:38:02 -
@@ -97,6 +97,7 @@
 AC_PATH_PROG([MV], [mv], [/bin/mv])
 AC_PATH_PROG([TAR], [tar], [/bin/tar])
 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_PROG_MKDIR_P
Index: libvirt.spec.in
===
RCS file: /data/cvs/libxen/libvirt.spec.in,v
retrieving revision 1.89
diff -u -r1.89 libvirt.spec.in
--- libvirt.spec.in 8 Aug 2008 14:27:05 -   1.89
+++ libvirt.spec.in 13 Aug 2008 12:38:02 -
@@ -72,6 +72,7 @@
 BuildRequires: xen-devel
 %endif
 BuildRequires: libxml2-devel
+BuildRequires: xhtml1-dtds
 BuildRequires: readline-devel
 BuildRequires: ncurses-devel
 BuildRequires: gettext
Index: docs/Makefile.am
===
RCS file: /data/cvs/libxen/docs/Makefile.am,v
retrieving revision 1.25
diff -u -r1.25 Makefile.am
--- docs/Makefile.am28 Apr 2008 08:29:35 -  1.25
+++ docs/Makefile.am13 Aug 2008 12:38:02 -
@@ -94,18 +94,22 @@
  $(XSLTPROC) --stringparam pagename $$name --nonet --html 
$(top_srcdir)/docs/site.xsl $< > $@ || (rm $@ && exit 1) ; fi )
 
 %.html: %.html.tmp
-   @(if [ -x $(XMLLINT) ] ; then \
+   @(if [ -x $(XMLLINT) -a -x $(XMLCATALOG) ] ; then \
+ if $(XMLCATALOG) /etc/xml/catalog 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"; > /dev/null ; then \
  echo "Validating $@" ; \
- $(XMLLINT) --nonet --format --valid $< > $@ || : ; fi );
+ $(XMLLINT) --nonet --format --valid $< > $@ || : ; \
+ else echo "missing XHTML1 DTD" ; fi ; fi );
 
 
 $(srcdir)/html/index.html: libvirt-api.xml newapi.xsl page.xsl sitemap.html.in
-@(if [ -x $(XSLTPROC) ] ; then \
  echo "Rebuilding the HTML pages from the XML API" ; \
  $(XSLTPROC) --nonet $(srcdir)/newapi.xsl libvirt-api.xml ; fi )
-   -@(if [ -x $(XMLLINT) ] ; then \
+   -@(if [ -x $(XMLLINT) -a -x $(XMLCATALOG) ] ; then \
+ if $(XMLCATALOG) /etc/xml/catalog 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"; > /dev/null ; then \
  echo "Validating the resulting XHTML pages" ; \
- $(XMLLINT) --nonet --valid --noout html/*.html ; fi );
+ $(XMLLINT) --nonet --valid --noout html/*.html ; \
+ else echo "missing XHTML1 DTD" ; fi ; fi );
 
 libvirt-api.xml libvirt-refs.xml: apibuild.py \
$(srcdir)/../include/libvirt/*.h \
--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list