LyXHTML doc doesn't pass validation
Thibaut Cuvelier
tcuvelier at lyx.org
Wed Mar 23 20:12:23 UTC 2022
On Wed, 23 Mar 2022 at 20:02, Lorenzo Bertini <lorenzobertini97 at gmail.com>
wrote:
> Il 23/03/22 19:03, Thibaut Cuvelier ha scritto:
> > On Wed, 23 Mar 2022 at 18:43, Lorenzo Bertini
> > <lorenzobertini97 at gmail.com <mailto:lorenzobertini97 at gmail.com>> wrote:
> >
> > Running a very simple LyXHTML doc (a section with a few paragraphs)
> > against this validator https://validator.w3.org/check
> > <https://validator.w3.org/check> reports some
> > errors, I don't really know if we care or not:
> >
> > 1. value of attribute "dir" cannot be "auto"; must be one of "ltr",
> > "rtl"
> > 2. element "section" undefined
> >
> > Is this a problem? I just wanted to check if I could use the <figure>
> > tag but its not part of the specification.
> >
> >
> > What version of HTML are you checking against? There are some glimpses
> > of HTML5 in the current output. For instance, dir="auto" and section are
> > perfectly legal in HTML5
> > (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir
> > <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir>
> and
> > https://developer.mozilla.org/en-US/docs/Web/HTML/Element/section
> > <https://developer.mozilla.org/en-US/docs/Web/HTML/Element/section>)
>
> I checked XHTML 1.0, as it should be what LyX outputs. I was about to
> check up some of the xhtml_output code to maybe add `figure`
> environments, but since its XHTML there's very little allowed.
>
XHTML 1 dates back from 2001... LyX generates XHTML 5, but the doctype is
kept from XHTML 1 for compatibility issues (some browsers completely change
their behaviour based on the doctype). The issue has been discussed on the
mailing list a while ago.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20220323/68b9bfec/attachment.html>
More information about the lyx-devel
mailing list