Using lyxhtml_validity.py

Kornel Benko kornel at lyx.org
Sun Jan 8 14:50:07 UTC 2023


Am Sun, 8 Jan 2023 09:37:03 -0500
schrieb Scott Kostyshak <skostysh at lyx.org>:

> On Sun, Jan 08, 2023 at 09:30:43AM +0100, Kornel Benko wrote:
> > Am Sun, 8 Jan 2023 00:59:34 +0100
> > schrieb Thibaut Cuvelier <dourouc05 at gmail.com>:
> >   
> > > On Sat, 7 Jan 2023 at 17:10, Kornel Benko <kornel at lyx.org> wrote:
> > >   
> > > > Am Sat, 7 Jan 2023 16:26:03 +0100
> > > > schrieb Thibaut Cuvelier <dourouc05 at gmail.com>:
> > > >  
> > > > > > After your recent changes, the number of errors decreased :)
> > > > > >
> > > > > > I got now (for Tufte_Book.xhtml)
> > > > > >         Error: Bad value "content-type" for attribute "http-equiv" on  
> > > > element "meta".  
> > > > > >         From line 5, column 1 to line 5, column 68 in resource
> > > > > >  
> > > > file:/usr9/BUILD/Mint21/BuildLyxGitQt5.15.3local-gcc12.1.0/autotests/out-home/AbC_wGZLha/examples/es/Books/Tufte_Book.xhtml
> > > >  
> > > > > >         Document checking completed.  
> > > > > >         > Found 3 validation errors!  
> > > > > >  
> > > > > This one should be fixed at a5c6215e. I still get two warnings with the  
> > > > latest output,  
> > > > > but they cannot be fixed unless we decide we do not generate XML-valid  
> > > > HTML at all  
> > > > > (which might be very disruptive for our users).
> > > > >  
> > > >
> > > > Not here. The error is the same as before.
> > > >         Error: Bad value "content-type" for attribute "http-equiv" on
> > > > element "meta".
> > > > Also the test export/mathmacros/testcases_basic_xhtml produces  plenty of
> > > >         Error: Text not allowed in element "mstyle" in this context
> > > >  
> > > 
> > > That's strange, because all 178 documents (including Tufte_book, but not
> > > mathmacros/testcases_basic) do not produce a single validation error on my
> > > machine: generating the XHTML for Tufte_Book and validating it manually (
> > > https://validator.nu/, it's advertised as the same software) doesn't yield
> > > any error. However, testcases_basic is not included in the list of tests I
> > > run. I'm attaching the log to check for differences.
> > > 
> > > For export/mathmacros/testcases_basic_xhtml, it's a bug in the MathML
> > > implementation, the mstyle tag should be an mtext (according to what the
> > > spec and MathType say: mstyle was just for text, but is not really useful
> > > anymore; mtext can contain raw text). It should be fixed at edcaad24; I'm
> > > working on a related validation error (triggered in the same document with
> > > this patch).  
> > 
> > There is no attachment in your mail.
> > 
> > Running the full ctest on the xhtml
> >  $ ctest -R '_xhtml$' -j24
> > gives here
> >  0% tests passed, 421 tests failed out of 421
> > .
> > Moreover, there are now 16 assertions while exporting.
> > autotests/export/docbook/Linguistics.lyx
> > doc/UserGuide.lyx
> > doc/ar/UserGuide.lyx
> > doc/ja/UserGuide.lyx
> > doc/ru/UserGuide.lyx
> > examples/Modules/Linguistics.lyx
> > examples/de/Modules/Linguistics.lyx
> > examples/es/Modules/Linguistics.lyx
> > examples/fr/Modules/Linguistics.lyx
> > examples/ja/Modules/Linguistics.lyx
> > doc/Math.lyx
> > doc/es/Math.lyx
> > doc/de/Math.lyx
> > doc/fr/Math.lyx
> > doc/ru/Math.lyx
> > doc/ja/Math.lyx
> > 
> > The assertion in Linguistics.lyx is triggered only if lyx is compiled with for
> > debugging. "support/lassert.cpp (52): ASSERTION ucs4[i] < 0x80 VIOLATED IN
> >  /usr2/src/lyx/lyx-git/src/support/docstring.cpp:65
> > 
> > Should I provide you with my ctest-changes? I feel unconfortable to commit something
> > producing errors while running ctest. OTOH, errors should be corrected.
> > 
> > Scott, what do you think?  
> 
> Thanks to you and Thibaut for working through this. I don't think we
> should commit until the test results are clean.
> 
> If it would help, I'm happy to test a patch and report back the results
> on my side.
> 
> Scott

OK, here they are.

One patch and a new file (development/autotests/simplehtml_validity.py)

	Kornel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: export.patch
Type: text/x-patch
Size: 13523 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20230108/aaa10d10/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: simplehtml_validity.py
Type: text/x-python
Size: 1359 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20230108/aaa10d10/attachment-0001.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: Digitale Signatur von OpenPGP
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20230108/aaa10d10/attachment-0001.asc>


More information about the lyx-devel mailing list