[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: XHTML validation (was: texi to epub)
From: |
Kurt Hornik |
Subject: |
Re: XHTML validation (was: texi to epub) |
Date: |
Thu, 16 Dec 2021 18:20:34 +0100 |
>>>>> Jacob Bachmeyer writes:
What I ended up doing is set up a local W3C service. On Debian, after
apt-get install w3c-markup-validator
apt-get install libapache2-mod-perl2
See /usr/share/doc/w3c-markup-validator/README.Debian:
Edit
/etc/w3c/validator.conf
to say
Allow Private IPs = yes
you can then work with <http://localhost/w3c-validator/check>.
I actually have written an R package to interface the local check
service, but Dr Google finds
https://github.com/ysangkok/w3c-validator-runner
and indeed after downloading something like
python3 validator-runner.py FILE
works like a charm :-)
Best
-k
> Patrice Dumas wrote:
>> On Wed, Dec 15, 2021 at 07:06:37PM +0100, Kurt Hornik wrote:
>>
>>> Friends,
>>>
>>> calibre does not guarantee that an EPUB produced by it is valid. The
>>> only guarantee it makes is that if you feed it valid XHTML 1.1 + CSS
>>> 2.1 it will output a valid EPUB.
>>>
>>> and of course makeinfo gives HTML 4.01 Transitional: I also tried the
>>> effect of going through HTML tidy to turn that into XHTML, but that did
>>> not make epubcheck happy.
>>>
>>
>> My wild guess is that outputting valid XHTML directly with texi2any is
>> probably the simplest way to go. This is actually probably a
>> prerequisite for generating epub anyway. I recall somebody else wanting
>> XHTML too.
>>
>> I could have a try, but before I would like to have an XHTML
>> command-line offline validator, is there something like that existing?
> If I remember correctly, the "offline" version of the W3C validator (a
> DTD bundle is available for download, to be used with OpenSP nsgmls) can
> also do XHTML 1.1, although I am unsure about exactly how thorough the
> validation will be for the XML constraints. There is some information
> at <URL:http://validator.w3.org/docs/devel.html> on the topic. I do
> know that Emacs' built-in support for HTML validation relied on nsgmls
> and the W3C DTD collection when I last checked.
> -- Jacob
Re: texi to epub, Per Bothner, 2021/12/15
Re: texi to epub, Kurt Hornik, 2021/12/16