Re: Using lyxhtml_validity.py
On Fri, 13 Jan 2023 at 17:29, Scott Kostyshak wrote: > On Wed, Jan 11, 2023 at 06:55:11AM +0100, Kornel Benko wrote: > > Am Wed, 11 Jan 2023 01:12:40 +0100 > > schrieb Thibaut Cuvelier : > > > > > > Still > > > > Error: Bad value "content-type" for attribute "http-equiv" > on element "meta". > > > > > > > > Should we ignore this error? > > > > > > > I don't think we should ignore it. It really seems to be > platform-dependent (either due > > > to LyX or the HTML validator). I really can't reproduce locally, even > when running the > > > test through CTest (log attached for Intro.lyx). However, when > uploading my file to > > > https://validator.nu/#file, I get the error message. > > > > I suppose the call to validate is still commented out in your > export.cmake? > > I have now enabled the call at 88087a3c, now that the test passes here > too. Thanks for > > your work. > > Thanks to both of you on making progress on these tests. Still a lot of > tests fail for me. Is it OK to comment out the check_xhtml_validate() > line until the tests are passing for all of us? Otherwise it's hard for > me to figure out which failures are due to regressions. > It's totally OK: I won't have time to work on all these issues in time for LyX 2.4. Some of them are rather deep (like being generated at the wrong place). -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Using lyxhtml_validity.py
Am Fri, 13 Jan 2023 15:09:21 -0500 schrieb Scott Kostyshak : > On Fri, Jan 13, 2023 at 06:16:48PM +0100, Kornel Benko wrote: > > Am Fri, 13 Jan 2023 11:28:55 -0500 > > schrieb Scott Kostyshak : > > > > > On Wed, Jan 11, 2023 at 06:55:11AM +0100, Kornel Benko wrote: > > > > Am Wed, 11 Jan 2023 01:12:40 +0100 > > > > schrieb Thibaut Cuvelier : > > > > > > > > > > Still > > > > > > Error: Bad value "content-type" for attribute "http-equiv" > > > > > > on element > > > > > > "meta". > > > > > > > > > > > > Should we ignore this error? > > > > > > > > > > > I don't think we should ignore it. It really seems to be > > > > > platform-dependent > > > > > (either due to LyX or the HTML validator). I really can't reproduce > > > > > locally, > > > > > even when running the test through CTest (log attached for > > > > > Intro.lyx). However, > > > > > when uploading my file to https://validator.nu/#file, I get the error > > > > > message. > > > > > > > > > > > > > I suppose the call to validate is still commented out in your > > > > export.cmake? > > > > I have now enabled the call at 88087a3c, now that the test passes here > > > > too. > > > > Thanks for your work. > > > > > > Thanks to both of you on making progress on these tests. Still a lot of > > > tests fail for me. Is it OK to comment out the check_xhtml_validate() > > > line until the tests are passing for all of us? Otherwise it's hard for > > > me to figure out which failures are due to regressions. > > > > > > Scott > > > > Yes, valid point. My intention was to have it enabled so that Thibaut can > > see failed > > tests without thinking on enabling them first. > > I see. In this case maybe we can enable them on a separate branch until > things are figured out. > > > But the distribution should have them > > disabled, since the need for html5validator is not handled appropriately. > > I think we disable the tests by default anyway in the distributed release. > > > Anyway, you have the last word on it. > > Let's keep them enabled another week to see if you and Thibaut figure > out the failures, and if not then disable them in a week, say 21 January? > Is this compromise acceptable to you? > > Scott Yes, thanks. Kornel pgp2WMcpQsFcn.pgp Description: Digitale Signatur von OpenPGP -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Using lyxhtml_validity.py
On Fri, Jan 13, 2023 at 06:16:48PM +0100, Kornel Benko wrote: > Am Fri, 13 Jan 2023 11:28:55 -0500 > schrieb Scott Kostyshak : > > > On Wed, Jan 11, 2023 at 06:55:11AM +0100, Kornel Benko wrote: > > > Am Wed, 11 Jan 2023 01:12:40 +0100 > > > schrieb Thibaut Cuvelier : > > > > > > > > Still > > > > > Error: Bad value "content-type" for attribute "http-equiv" on > > > > > element > > > > > "meta". > > > > > > > > > > Should we ignore this error? > > > > > > > > > I don't think we should ignore it. It really seems to be > > > > platform-dependent (either > > > > due to LyX or the HTML validator). I really can't reproduce locally, > > > > even when > > > > running the test through CTest (log attached for Intro.lyx). However, > > > > when > > > > uploading my file to https://validator.nu/#file, I get the error > > > > message. > > > > > > I suppose the call to validate is still commented out in your > > > export.cmake? > > > I have now enabled the call at 88087a3c, now that the test passes here > > > too. Thanks for > > > your work. > > > > Thanks to both of you on making progress on these tests. Still a lot of > > tests fail for me. Is it OK to comment out the check_xhtml_validate() > > line until the tests are passing for all of us? Otherwise it's hard for > > me to figure out which failures are due to regressions. > > > > Scott > > Yes, valid point. My intention was to have it enabled so that Thibaut can see > failed > tests without thinking on enabling them first. I see. In this case maybe we can enable them on a separate branch until things are figured out. > But the distribution should have them > disabled, since the need for html5validator is not handled appropriately. I think we disable the tests by default anyway in the distributed release. > Anyway, you have the last word on it. Let's keep them enabled another week to see if you and Thibaut figure out the failures, and if not then disable them in a week, say 21 January? Is this compromise acceptable to you? Scott signature.asc Description: PGP signature -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Using lyxhtml_validity.py
Am Fri, 13 Jan 2023 11:28:55 -0500 schrieb Scott Kostyshak : > On Wed, Jan 11, 2023 at 06:55:11AM +0100, Kornel Benko wrote: > > Am Wed, 11 Jan 2023 01:12:40 +0100 > > schrieb Thibaut Cuvelier : > > > > > > Still > > > > Error: Bad value "content-type" for attribute "http-equiv" on > > > > element > > > > "meta". > > > > > > > > Should we ignore this error? > > > > > > > I don't think we should ignore it. It really seems to be > > > platform-dependent (either > > > due to LyX or the HTML validator). I really can't reproduce locally, even > > > when > > > running the test through CTest (log attached for Intro.lyx). However, when > > > uploading my file to https://validator.nu/#file, I get the error message. > > > > > > > I suppose the call to validate is still commented out in your export.cmake? > > I have now enabled the call at 88087a3c, now that the test passes here too. > > Thanks for > > your work. > > Thanks to both of you on making progress on these tests. Still a lot of > tests fail for me. Is it OK to comment out the check_xhtml_validate() > line until the tests are passing for all of us? Otherwise it's hard for > me to figure out which failures are due to regressions. > > Scott Yes, valid point. My intention was to have it enabled so that Thibaut can see failed tests without thinking on enabling them first. But the distribution should have them disabled, since the need for html5validator is not handled appropriately. Anyway, you have the last word on it. Kornel pgpE4b5CELc15.pgp Description: Digitale Signatur von OpenPGP -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Using lyxhtml_validity.py
On Wed, Jan 11, 2023 at 06:55:11AM +0100, Kornel Benko wrote: > Am Wed, 11 Jan 2023 01:12:40 +0100 > schrieb Thibaut Cuvelier : > > > > Still > > > Error: Bad value "content-type" for attribute "http-equiv" on > > > element "meta". > > > > > > Should we ignore this error? > > > > > I don't think we should ignore it. It really seems to be platform-dependent > > (either due > > to LyX or the HTML validator). I really can't reproduce locally, even when > > running the > > test through CTest (log attached for Intro.lyx). However, when uploading my > > file to > > https://validator.nu/#file, I get the error message. > > I suppose the call to validate is still commented out in your export.cmake? > I have now enabled the call at 88087a3c, now that the test passes here too. > Thanks for > your work. Thanks to both of you on making progress on these tests. Still a lot of tests fail for me. Is it OK to comment out the check_xhtml_validate() line until the tests are passing for all of us? Otherwise it's hard for me to figure out which failures are due to regressions. Scott signature.asc Description: PGP signature -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Using lyxhtml_validity.py
Am Wed, 11 Jan 2023 06:55:11 +0100 schrieb Kornel Benko : > Am Wed, 11 Jan 2023 01:12:40 +0100 > schrieb Thibaut Cuvelier : > > > > Still > > > Error: Bad value "content-type" for attribute "http-equiv" on > > > element > > > "meta". > > > > > > Should we ignore this error? > > > > > I don't think we should ignore it. It really seems to be platform-dependent > > (either > > due to LyX or the HTML validator). I really can't reproduce locally, even > > when > > running the test through CTest (log attached for Intro.lyx). However, when > > uploading > > my file to https://validator.nu/#file, I get the error message. > > I suppose the call to validate is still commented out in your export.cmake? > I have now enabled the call at 88087a3c, now that the test passes here too. > Thanks for > your work. > > Kornel Running all the xhtml-tests now: 63% tests passed, 156 tests failed out of 421 The 10 tests with the most errors is with: examples/External_Material/Spreadsheet.xhtml doc/(ja|es|fr|)/Math.xhtml.validate doc/ja/UserGuide.xhtml doc/(|de|ru)/Math.xhtml doc/(|de|es|fr|ja)EmbeddedObjects.xhtml This is way better than '0% tests passed'. Kornel pgpgCQ12oKa2n.pgp Description: Digitale Signatur von OpenPGP -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Using lyxhtml_validity.py
Am Wed, 11 Jan 2023 01:12:40 +0100 schrieb Thibaut Cuvelier : > > Still > > Error: Bad value "content-type" for attribute "http-equiv" on > > element "meta". > > > > Should we ignore this error? > > > I don't think we should ignore it. It really seems to be platform-dependent > (either due > to LyX or the HTML validator). I really can't reproduce locally, even when > running the > test through CTest (log attached for Intro.lyx). However, when uploading my > file to > https://validator.nu/#file, I get the error message. I suppose the call to validate is still commented out in your export.cmake? I have now enabled the call at 88087a3c, now that the test passes here too. Thanks for your work. Kornel pgpnMnkDjzvqS.pgp Description: Digitale Signatur von OpenPGP -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Using lyxhtml_validity.py
Am Mon, 9 Jan 2023 04:08:34 +0100 schrieb Thibaut Cuvelier : > > -- Calling: /usr/bin/xmllint --loaddtd --noout > > "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_GWnnqL/doc/Intro.xhtml" > > -- Check the output: /usr/bin/perl > > /home/scott/lyxbuilds/master-master/repo/development/autotests/examineXmllintOutput.pl > > -- Msg Summary: -- OK: Exporting > > "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_GWnnqL/doc/Intro.lyx" > > to format xhtml -- Error: 254 validating > > "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_GWnnqL/doc/Intro.xhtml.validate_out" > > -- Error: Non empty output > > "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_GWnnqL/doc/Intro.xhtml.validate_out" > > with "symplehtml_validity.py" -- OK: Checking > > "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_GWnnqL/doc/Intro.xhtml" > > with /usr/bin/xmllint -- OK: Parse messages of /usr/bin/xmllint for > > errors -- > > Exporting doc/Intro.lyx to xhtml CMake Error at > > /home/scott/lyxbuilds/master-master/repo/development/autotests/export.cmake:369 > > (message): Export failed > > > These two errors should be fixed at > 9ae793c6 > . Tables are a bit hard to work with, because HTML output can be used for > DocBook with > slightly different properties :/. The code is probably not too efficient due > to string > building, but doing something else would have required reworking the xmlRow > function > more than that. > Still Error: Bad value "content-type" for attribute "http-equiv" on element "meta". Should we ignore this error? Kornel pgppex9f4RrmC.pgp Description: Digitale Signatur von OpenPGP -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Using lyxhtml_validity.py
Am Mon, 9 Jan 2023 04:20:48 +0100 schrieb Thibaut Cuvelier : > [...] > > Sorry for the series of emails, I didn't see the latest developments when I > started replying... > > Regarding simplehtml_validity.py, I think you went a bit fast when > simplifying my code, with many parts now useless. I suggest the attached > patch. > > I'm currently running the new test suite (with the check_xhtml_validate(${ > result_file_name}) line uncommented). > > [0001-Simplify-simplehtml_validity.py.patch application/octet-stream (2281 > Bytes)] > > [0002-Export-tests-use-a-better-function-name.patch application/octet-stream > (1843 > Bytes)] Agreed, feel free to commit. Kornel pgpLH3ukn70Wq.pgp Description: Digitale Signatur von OpenPGP -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Using lyxhtml_validity.py
Am Mon, 9 Jan 2023 01:24:16 +0100 schrieb Thibaut Cuvelier : > The assertion could be fixed by my latest commit, > 1b09bc965d > . That code should never have made it to a commit in the first place, but > it's fixed. Confirmed. Kornel pgpXX3ADFzqKI.pgp Description: Digitale Signatur von OpenPGP -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Using lyxhtml_validity.py
On Sun, 8 Jan 2023 at 17:11, Kornel Benko wrote: > Am Sun, 8 Jan 2023 10:57:40 -0500 > schrieb Scott Kostyshak : > > > > Same here. To disable the validity-check simply comment the line > > > development/autotests/export.cmake:335 > > > --> #check_xhtml_validate(${result_file_name}) > > > > Would it be reasonable to commit everything, but keep the validity-check > > commented out? That way it would at least be a bit easier for Thibaut to > > just uncomment the extra check when they want to run it? > > > > I still prefer for it to be commented out by default, until the tests > > pass for us. > > > > Scott > > Yes, that was also one reason to refactor export.cmake. > > I will commit. > Sorry for the series of emails, I didn't see the latest developments when I started replying... Regarding simplehtml_validity.py, I think you went a bit fast when simplifying my code, with many parts now useless. I suggest the attached patch. I'm currently running the new test suite (with the check_xhtml_validate(${ result_file_name}) line uncommented). 0001-Simplify-simplehtml_validity.py.patch Description: Binary data 0002-Export-tests-use-a-better-function-name.patch Description: Binary data -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Using lyxhtml_validity.py
On Sun, 8 Jan 2023 at 16:32, Scott Kostyshak wrote: > On Sun, Jan 08, 2023 at 04:22:09PM +0100, Kornel Benko wrote: > > Am Sun, 8 Jan 2023 10:11:37 -0500 > > schrieb Scott Kostyshak : > > > > > On Sun, Jan 08, 2023 at 03:50:07PM +0100, Kornel Benko wrote: > > > > Am Sun, 8 Jan 2023 09:37:03 -0500 > > > > schrieb Scott Kostyshak : > > > > > > > > > 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 : > > > > > > > > > > > > > On Sat, 7 Jan 2023 at 17:10, Kornel Benko > wrote: > > > > > > > > > > > > > > > Am Sat, 7 Jan 2023 16:26:03 +0100 > > > > > > > > schrieb Thibaut Cuvelier : > > > > > > > > > > > > > > > > > > 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) > > > > > > All xhtml tests fail for me with the patch and
Re: Using lyxhtml_validity.py
On Sun, 8 Jan 2023 at 09:31, Kornel Benko wrote: > Am Sun, 8 Jan 2023 00:59:34 +0100 > schrieb Thibaut Cuvelier : > > > On Sat, 7 Jan 2023 at 17:10, Kornel Benko wrote: > > > > > Am Sat, 7 Jan 2023 16:26:03 +0100 > > > schrieb Thibaut Cuvelier : > > > > > > > > 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. > The assertion could be fixed by my latest commit, 1b09bc965d . That code should never have made it to a commit in the first place, but it's fixed. If you could send me your CTest patch, I could try to replicate the failures locally. (By the way, here is the missing attachment.) Exporting 178 LyX files to LyXHTML format in the directory C:\Users\Thibaut\AppData\Local\Temp\tmpqh7ad5qd * Generating MissingEndLayoutBetweenTables.lyx... > Done generating > D:\LyX\lyx-unstable\autotests\export\MissingEndLayoutBetweenTables.lyx to > C:\Users\Thibaut\AppData\Local\Temp\tmpqh7ad5qd\MissingEndLayoutBetweenTables.lyx * Generating mixing_inTitle_layouts.lyx... > Done generating > D:\LyX\lyx-unstable\autotests\export\mixing_inTitle_layouts.lyx to > C:\Users\Thibaut\AppData\Local\Temp\tmpqh7ad5qd\mixing_inTitle_layouts.lyx * Generating WrongDfnTagHandling.lyx... > Done generating D:\LyX\lyx-unstable\autotests\export\WrongDfnTagHandling.lyx > to C:\Users\Thibaut\AppData\Local\Temp\tmpqh7ad5qd\WrongDfnTagHandling.lyx * Generating A0_Poster_Simple.lyx... > Done generating > D:\LyX\lyx-unstable\autotests\export\docbook\A0_Poster_Simple.lyx to > C:\Users\Thibaut\AppData\Local\Temp\tmpqh7ad5qd\A0_Poster_Simple.lyx * Generating abstract_list.lyx... > Done generating > D:\LyX\lyx-unstable\autotests\export\docbook\abstract_list.lyx to > C:\Users\Thibaut\AppData\Local\Temp\tmpqh7ad5qd\abstract_list.lyx * Generating acknowledgments_jasa.lyx... Warning: Document class not available The selected document class Journal of the Acoustical Society of America (JASA) requires external files that are not available. The document class can still be
Re: Using lyxhtml_validity.py
Am Sun, 8 Jan 2023 10:57:40 -0500 schrieb Scott Kostyshak : > > Same here. To disable the validity-check simply comment the line > > development/autotests/export.cmake:335 > > --> #check_xhtml_validate(${result_file_name}) > > Would it be reasonable to commit everything, but keep the validity-check > commented out? That way it would at least be a bit easier for Thibaut to > just uncomment the extra check when they want to run it? > > I still prefer for it to be commented out by default, until the tests > pass for us. > > Scott Yes, that was also one reason to refactor export.cmake. I will commit. Kornel pgpEdOi7dRkxN.pgp Description: Digitale Signatur von OpenPGP -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Using lyxhtml_validity.py
On Sun, Jan 08, 2023 at 04:48:31PM +0100, Kornel Benko wrote: > Am Sun, 8 Jan 2023 10:32:25 -0500 > schrieb Scott Kostyshak : > > > On Sun, Jan 08, 2023 at 04:22:09PM +0100, Kornel Benko wrote: > > > Am Sun, 8 Jan 2023 10:11:37 -0500 > > > schrieb Scott Kostyshak : > > [skip] > > > > > -- Msg Summary: -- OK: Exporting > > > > "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_UxUzu8/doc/Intro.lyx" > > > > to format xhtml -- Error: 1 validating > > > > > > This is suspicious. I get here > > > Error: 254 validating > > > Maybe you forgot to install html5validator? > > > $ pip3 install html5validator>=0.4.2 > > > > > > > "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_UxUzu8/doc/Intro.xhtml.validate_out" > > > > -- OK: Checking > > > > "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_UxUzu8/doc/Intro.xhtml" > > > > with /usr/bin/xmllint --OK: Parse messages of /usr/bin/xmllint > > > > for errors > > > > -- Exporting doc/Intro.lyx to xhtml CMake Error at > > > > /home/scott/lyxbuilds/master-master/repo/development/autotests/export.cmake:369 > > > > (message): Export failed > > > > Ah yes you are right. Now I get: > > > > > > -- Expected result file > > "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_GWnnqL/doc/Intro.xhtml" > > exists -- Calling /usr/bin/python3.10 > > "/home/scott/lyxbuilds/master-master/repo/development/autotests/simplehtml_validity.py" > > "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_GWnnqL/doc/Intro.xhtml" > > -- Error: Bad value "content-type" for attribute "http-equiv" on element > > "meta". From > > line 5, column 1; to line 5, column 69 in resource > > file:/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_GWnnqL/doc/Intro.xhtml > > Error: The "align" attribute on the "td" element is obsolete. Use CSS > > instead. From > > line 316, column 1; to line 316, column 103 in resource > > file:/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_GWnnqL/doc/Intro.xhtml > > Error: The "valign" attribute on the "td" element is obsolete. Use CSS > > instead. ... > > [cut many messages] Error: The "valign" attribute on the "td" element is > > obsolete. Use > > CSS instead. From line 434, column 1; to line 434, column 102 in resource > > file:/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_GWnnqL/doc/Intro.xhtml > > Document checking completed. > > > Found 163 validation errors! > > > > -- Calling: /usr/bin/xmllint --loaddtd --noout > > "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_GWnnqL/doc/Intro.xhtml" > > -- Check the output: /usr/bin/perl > > /home/scott/lyxbuilds/master-master/repo/development/autotests/examineXmllintOutput.pl > > -- Msg Summary: -- OK: Exporting > > "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_GWnnqL/doc/Intro.lyx" > > to format xhtml -- Error: 254 validating > > "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_GWnnqL/doc/Intro.xhtml.validate_out" > > -- Error: Non empty output > > "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_GWnnqL/doc/Intro.xhtml.validate_out" > > with "symplehtml_validity.py" --OK: Checking > > "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_GWnnqL/doc/Intro.xhtml" > > with /usr/bin/xmllint --OK: Parse messages of /usr/bin/xmllint for > > errors -- > > Exporting doc/Intro.lyx to xhtml CMake Error at > > /home/scott/lyxbuilds/master-master/repo/development/autotests/export.cmake:369 > > (message): Export failed > > > > Scott > > Same here. To disable the validity-check simply comment the line > development/autotests/export.cmake:335 > --> #check_xhtml_validate(${result_file_name}) Would it be reasonable to commit everything, but keep the validity-check commented out? That way it would at least be a bit easier for Thibaut to just uncomment the extra check when they want to run it? I still prefer for it to be commented out by default, until the tests pass for us. Scott signature.asc Description: PGP signature -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Using lyxhtml_validity.py
Am Sun, 8 Jan 2023 10:32:25 -0500 schrieb Scott Kostyshak : > On Sun, Jan 08, 2023 at 04:22:09PM +0100, Kornel Benko wrote: > > Am Sun, 8 Jan 2023 10:11:37 -0500 > > schrieb Scott Kostyshak : [skip] > > > -- Msg Summary: --OK: Exporting > > > "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_UxUzu8/doc/Intro.lyx" > > > to format xhtml --Error: 1 validating > > > > This is suspicious. I get here > > Error: 254 validating > > Maybe you forgot to install html5validator? > > $ pip3 install html5validator>=0.4.2 > > > > > "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_UxUzu8/doc/Intro.xhtml.validate_out" > > > --OK: Checking > > > "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_UxUzu8/doc/Intro.xhtml" > > > with /usr/bin/xmllint -- OK: Parse messages of /usr/bin/xmllint for > > > errors > > > -- Exporting doc/Intro.lyx to xhtml CMake Error at > > > /home/scott/lyxbuilds/master-master/repo/development/autotests/export.cmake:369 > > > (message): Export failed > > Ah yes you are right. Now I get: > > > -- Expected result file > "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_GWnnqL/doc/Intro.xhtml" > exists -- Calling /usr/bin/python3.10 > "/home/scott/lyxbuilds/master-master/repo/development/autotests/simplehtml_validity.py" > "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_GWnnqL/doc/Intro.xhtml" > -- Error: Bad value "content-type" for attribute "http-equiv" on element > "meta". From > line 5, column 1; to line 5, column 69 in resource > file:/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_GWnnqL/doc/Intro.xhtml > Error: The "align" attribute on the "td" element is obsolete. Use CSS > instead. From > line 316, column 1; to line 316, column 103 in resource > file:/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_GWnnqL/doc/Intro.xhtml > Error: The "valign" attribute on the "td" element is obsolete. Use CSS > instead. ... > [cut many messages] Error: The "valign" attribute on the "td" element is > obsolete. Use > CSS instead. From line 434, column 1; to line 434, column 102 in resource > file:/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_GWnnqL/doc/Intro.xhtml > Document checking completed. > > Found 163 validation errors! > > -- Calling: /usr/bin/xmllint --loaddtd --noout > "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_GWnnqL/doc/Intro.xhtml" > -- Check the output: /usr/bin/perl > /home/scott/lyxbuilds/master-master/repo/development/autotests/examineXmllintOutput.pl > -- Msg Summary: --OK: Exporting > "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_GWnnqL/doc/Intro.lyx" > to format xhtml --Error: 254 validating > "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_GWnnqL/doc/Intro.xhtml.validate_out" > --Error: Non empty output > "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_GWnnqL/doc/Intro.xhtml.validate_out" > with "symplehtml_validity.py" -- OK: Checking > "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_GWnnqL/doc/Intro.xhtml" > with /usr/bin/xmllint -- OK: Parse messages of /usr/bin/xmllint for > errors -- > Exporting doc/Intro.lyx to xhtml CMake Error at > /home/scott/lyxbuilds/master-master/repo/development/autotests/export.cmake:369 > (message): Export failed > > Scott Same here. To disable the validity-check simply comment the line development/autotests/export.cmake:335 --> #check_xhtml_validate(${result_file_name}) Kornel pgpTpXOYMQRwN.pgp Description: Digitale Signatur von OpenPGP -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Using lyxhtml_validity.py
On Sun, Jan 08, 2023 at 04:22:09PM +0100, Kornel Benko wrote: > Am Sun, 8 Jan 2023 10:11:37 -0500 > schrieb Scott Kostyshak : > > > On Sun, Jan 08, 2023 at 03:50:07PM +0100, Kornel Benko wrote: > > > Am Sun, 8 Jan 2023 09:37:03 -0500 > > > schrieb Scott Kostyshak : > > > > > > > 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 : > > > > > > > > > > > On Sat, 7 Jan 2023 at 17:10, Kornel Benko wrote: > > > > > > > > > > > > > Am Sat, 7 Jan 2023 16:26:03 +0100 > > > > > > > schrieb Thibaut Cuvelier : > > > > > > > > > > > > > > > > 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) > >
Re: Using lyxhtml_validity.py
Am Sun, 8 Jan 2023 10:11:37 -0500 schrieb Scott Kostyshak : > On Sun, Jan 08, 2023 at 03:50:07PM +0100, Kornel Benko wrote: > > Am Sun, 8 Jan 2023 09:37:03 -0500 > > schrieb Scott Kostyshak : > > > > > 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 : > > > > > > > > > On Sat, 7 Jan 2023 at 17:10, Kornel Benko wrote: > > > > > > > > > > > Am Sat, 7 Jan 2023 16:26:03 +0100 > > > > > > schrieb Thibaut Cuvelier : > > > > > > > > > > > > > > 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) > > All xhtml tests fail for me with the patch and file. I get: > > > LyX.cpp (444): Deleting tmp dir /tmp/lyx_tmpdir.WugyQcqXZywf > -- Expected result file > "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_UxUzu8/doc/Intro.xhtml" > exists -- Calling /usr/bin/python3.10 >
Re: Using lyxhtml_validity.py
On Sun, Jan 08, 2023 at 03:50:07PM +0100, Kornel Benko wrote: > Am Sun, 8 Jan 2023 09:37:03 -0500 > schrieb Scott Kostyshak : > > > 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 : > > > > > > > On Sat, 7 Jan 2023 at 17:10, Kornel Benko wrote: > > > > > > > > > Am Sat, 7 Jan 2023 16:26:03 +0100 > > > > > schrieb Thibaut Cuvelier : > > > > > > > > > > > > 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) All xhtml tests fail for me with the patch and file. I get: LyX.cpp (444): Deleting tmp dir /tmp/lyx_tmpdir.WugyQcqXZywf -- Expected result file "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_UxUzu8/doc/Intro.xhtml" exists -- Calling /usr/bin/python3.10 "/home/scott/lyxbuilds/master-master/repo/development/autotests/simplehtml_validity.py" "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_UxUzu8/doc/Intro.xhtml" -- Calling: /usr/bin/xmllint --loaddtd --noout "/home/scott/lyxbuilds/master-master/CMakeBuild/autotests/out-home/AbC_UxUzu8/doc/Intro.xhtml" -- Check the output: /usr/bin/perl
Re: Using lyxhtml_validity.py
Am Sun, 8 Jan 2023 09:37:03 -0500 schrieb Scott Kostyshak : > 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 : > > > > > On Sat, 7 Jan 2023 at 17:10, Kornel Benko wrote: > > > > > > > Am Sat, 7 Jan 2023 16:26:03 +0100 > > > > schrieb Thibaut Cuvelier : > > > > > > > > > > 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 diff --git a/development/autotests/ExportTests.cmake b/development/autotests/ExportTests.cmake index 60d813b48d..e0b31ff953 100644 --- a/development/autotests/ExportTests.cmake +++ b/development/autotests/ExportTests.cmake @@ -360,10 +360,11 @@ foreach(libsubfolderx autotests/export lib/doc lib/examples lib/templates lib/ta -DLYX_FORMAT_NUM=${_lyx_format_num} -Dfile=${f} -Dinverted=${inverted} -DTOP_SRC_DIR=${TOP_SRC_DIR} -DPERL_EXECUTABLE=${PERL_EXECUTABLE} + -DLYX_PYTHON_EXECUTABLE=${LYX_PYTHON_EXECUTABLE} -P "${TOP_SRC_DIR}/development/autotests/export.cmake") setmarkedtestlabel(${TestName} ${mytestlabel}) endif() endforeach() if(LYX_PYTHON_EXECUTABLE) @@ -458,15 +459,15 @@ foreach(libsubfolderx autotests/export lib/doc lib/examples lib/templates lib/ta else() set(mytestlabel ${testlabel} ${extraLabels}) endif() string(REGEX REPLACE "[\\(\\)]" "_" TestName
Re: Using lyxhtml_validity.py
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 : > > > On Sat, 7 Jan 2023 at 17:10, Kornel Benko wrote: > > > > > Am Sat, 7 Jan 2023 16:26:03 +0100 > > > schrieb Thibaut Cuvelier : > > > > > > > > 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 signature.asc Description: PGP signature -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Using lyxhtml_validity.py
Am Sun, 8 Jan 2023 00:59:34 +0100 schrieb Thibaut Cuvelier : > On Sat, 7 Jan 2023 at 17:10, Kornel Benko wrote: > > > Am Sat, 7 Jan 2023 16:26:03 +0100 > > schrieb Thibaut Cuvelier : > > > > > > 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? Kornel pgpaihdqiHXJ8.pgp Description: Digitale Signatur von OpenPGP -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Using lyxhtml_validity.py
On Sat, 7 Jan 2023 at 17:10, Kornel Benko wrote: > Am Sat, 7 Jan 2023 16:26:03 +0100 > schrieb Thibaut Cuvelier : > > > > 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). -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Using lyxhtml_validity.py
Am Sat, 7 Jan 2023 16:26:03 +0100 schrieb Thibaut Cuvelier : > > 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 Kornel pgpLGDP1mmWUo.pgp Description: Digitale Signatur von OpenPGP -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Using lyxhtml_validity.py
On Sat, 7 Jan 2023 at 10:41, Kornel Benko wrote: > Am Sat, 7 Jan 2023 03:59:54 +0100 > schrieb Thibaut Cuvelier : > > > On Sat, 31 Dec 2022 at 10:37, Kornel Benko wrote: > > > > > Hi Thibaut, > > > I started to integrate (a modified) version of lyxhtml_validity.py. > > > But I am getting errors like in the attached. > > > > > > > Hi Kornel, > > > > It may very well be the latest patches I got for XHTML that trigger > > different code paths for the validator (I haven't run it yet since the > > switch to XHTML 5): some errors and warnings are related to the > conversion > > to XHTML5, others just didn't trigger before. > > > > Error: Bad value "en_US" for attribute "lang" on element "html": The > > language subtag "en_us" is not a valid language subtag. > > This problem should be fixed by switching lib/languages' LangCode to > BCP47, > > as suggested as a TODO in the comments. I implemented a quick fix in > > 26e6b1c2. As these are the only two places in LyX where the conversion is > > needed, I believe it is sufficient for now. > > > > Error: Bad value "Content-type" for attribute "http-equiv" on element > > "meta". > > The value must be in lower case, i.e. "content-type" ( > > https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta). This is > > fixed at cabb12ba. > > > > Error: A document must not include both a "meta" element with an > > "http-equiv" attribute whose value is "content-type", and a "meta" > element > > with a "charset" attribute. > > I removed one occurrence (the charset, because it is the newest and has > the > > worst support among ancient browsers, pre-2010 roughly, and I had to pick > > one). > > > > Error: CSS: "font-weight": "medium" is not a "font-weight" value. > > That one is more tricky, it's a problem when defining a style. That's > fixed > > as of 4c1f9d11. > > > > Warning: The "type" attribute for the "style" element is not needed and > > should be omitted. > > Not an error per se, but removing the deprecated argument shouldn't be a > > problem even for ancient browsers (only CSS was ever implemented, after > > all). https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style > Fixed > > at fb4a2657. > > > > Warning: Section lacks heading. Consider using "h2"-"h6" elements to add > > identifying headings to all sections. > > Not a serious error, but semantically the XHTML code could be much better > > (that could help with accessibility, for instance). Here is an excerpt > for > > the Tufte example you are using: > > > > The Features of the > > Tufte-book Class > > This really should be a . I'm implementing a change in > > the layouts themselves for this (051c5f27). The other possibility would > be > > to change Layout::htmltag() to return hX instead of div for sectioning > > elements, based on toclevel; the problem is that we would need to convert > > toclevel to an integer between 1 and 6. I remember seeing horrible values > > (including -1000, but also -1 for Beamer parts and other layouts), making > > me wary: is it possible to write simple code that works automagically for > > every interesting case? > > > > In any case, the script works as expected :)! > > 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). -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Using lyxhtml_validity.py
Am Sat, 7 Jan 2023 03:59:54 +0100 schrieb Thibaut Cuvelier : > On Sat, 31 Dec 2022 at 10:37, Kornel Benko wrote: > > > Hi Thibaut, > > I started to integrate (a modified) version of lyxhtml_validity.py. > > But I am getting errors like in the attached. > > > > Hi Kornel, > > It may very well be the latest patches I got for XHTML that trigger > different code paths for the validator (I haven't run it yet since the > switch to XHTML 5): some errors and warnings are related to the conversion > to XHTML5, others just didn't trigger before. > > Error: Bad value "en_US" for attribute "lang" on element "html": The > language subtag "en_us" is not a valid language subtag. > This problem should be fixed by switching lib/languages' LangCode to BCP47, > as suggested as a TODO in the comments. I implemented a quick fix in > 26e6b1c2. As these are the only two places in LyX where the conversion is > needed, I believe it is sufficient for now. > > Error: Bad value "Content-type" for attribute "http-equiv" on element > "meta". > The value must be in lower case, i.e. "content-type" ( > https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta). This is > fixed at cabb12ba. > > Error: A document must not include both a "meta" element with an > "http-equiv" attribute whose value is "content-type", and a "meta" element > with a "charset" attribute. > I removed one occurrence (the charset, because it is the newest and has the > worst support among ancient browsers, pre-2010 roughly, and I had to pick > one). > > Error: CSS: "font-weight": "medium" is not a "font-weight" value. > That one is more tricky, it's a problem when defining a style. That's fixed > as of 4c1f9d11. > > Warning: The "type" attribute for the "style" element is not needed and > should be omitted. > Not an error per se, but removing the deprecated argument shouldn't be a > problem even for ancient browsers (only CSS was ever implemented, after > all). https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style Fixed > at fb4a2657. > > Warning: Section lacks heading. Consider using "h2"-"h6" elements to add > identifying headings to all sections. > Not a serious error, but semantically the XHTML code could be much better > (that could help with accessibility, for instance). Here is an excerpt for > the Tufte example you are using: > > The Features of the > Tufte-book Class > This really should be a . I'm implementing a change in > the layouts themselves for this (051c5f27). The other possibility would be > to change Layout::htmltag() to return hX instead of div for sectioning > elements, based on toclevel; the problem is that we would need to convert > toclevel to an integer between 1 and 6. I remember seeing horrible values > (including -1000, but also -1 for Beamer parts and other layouts), making > me wary: is it possible to write simple code that works automagically for > every interesting case? > > In any case, the script works as expected :)! 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! Kornel pgpz46oUIDIUx.pgp Description: Digitale Signatur von OpenPGP -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Using lyxhtml_validity.py
On Sat, 31 Dec 2022 at 10:37, Kornel Benko wrote: > Hi Thibaut, > I started to integrate (a modified) version of lyxhtml_validity.py. > But I am getting errors like in the attached. > Hi Kornel, It may very well be the latest patches I got for XHTML that trigger different code paths for the validator (I haven't run it yet since the switch to XHTML 5): some errors and warnings are related to the conversion to XHTML5, others just didn't trigger before. Error: Bad value "en_US" for attribute "lang" on element "html": The language subtag "en_us" is not a valid language subtag. This problem should be fixed by switching lib/languages' LangCode to BCP47, as suggested as a TODO in the comments. I implemented a quick fix in 26e6b1c2. As these are the only two places in LyX where the conversion is needed, I believe it is sufficient for now. Error: Bad value "Content-type" for attribute "http-equiv" on element "meta". The value must be in lower case, i.e. "content-type" ( https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta). This is fixed at cabb12ba. Error: A document must not include both a "meta" element with an "http-equiv" attribute whose value is "content-type", and a "meta" element with a "charset" attribute. I removed one occurrence (the charset, because it is the newest and has the worst support among ancient browsers, pre-2010 roughly, and I had to pick one). Error: CSS: "font-weight": "medium" is not a "font-weight" value. That one is more tricky, it's a problem when defining a style. That's fixed as of 4c1f9d11. Warning: The "type" attribute for the "style" element is not needed and should be omitted. Not an error per se, but removing the deprecated argument shouldn't be a problem even for ancient browsers (only CSS was ever implemented, after all). https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style Fixed at fb4a2657. Warning: Section lacks heading. Consider using "h2"-"h6" elements to add identifying headings to all sections. Not a serious error, but semantically the XHTML code could be much better (that could help with accessibility, for instance). Here is an excerpt for the Tufte example you are using: The Features of the Tufte-book Class This really should be a . I'm implementing a change in the layouts themselves for this (051c5f27). The other possibility would be to change Layout::htmltag() to return hX instead of div for sectioning elements, based on toclevel; the problem is that we would need to convert toclevel to an integer between 1 and 6. I remember seeing horrible values (including -1000, but also -1 for Beamer parts and other layouts), making me wary: is it possible to write simple code that works automagically for every interesting case? In any case, the script works as expected :)! -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel