DocBook v2

Thibaut Cuvelier tcuvelier at lyx.org
Tue Sep 1 23:02:53 UTC 2020


On Tue, 1 Sep 2020 at 16:55, Kornel Benko <kornel at lyx.org> wrote:

> Am Tue, 1 Sep 2020 10:32:59 -0400
> schrieb Scott Kostyshak <skostysh at lyx.org>:
>
> > On Tue, Sep 01, 2020 at 02:00:18PM +0200, Kornel Benko wrote:
> >
> > > This is impressing.
> >
> > +1
> >
> > Scott
>
> These 2 are crashing
> examples/de/Modules/Linguistics.lyx: assertion
> templates/Articles/REVTeX_%28V._4.1%29.lyx: assertion
>
> Both in src/support/docstring.cpp:53
>         LATTEST(static_cast<unsigned char>(ascii[i]) < 0x80);
>

I did not get a problem on that line with Linguistics.lyx (I did not yet
have a look at the other file yet), but I suppose it is now fixed. (At
least, before my last few commits, my code crashed on Windows, and now I
get an almost perfect DocBook document.) I still have a strange issue
happening with Linguistics.lyx, but it produces valid XML without
assertions, so the test should be fixed for now.
I would be interested if you could run the tests with the latest changes :)
(I did not yet manage to get them running here: since I reconfigured the
whole project, the test suite seems much shorter…).

By the way, would it be possible to include validity checks in the test
suite? That would mean calling a Java library to ensure that the DocBook
documents follow the specifications (which is a much stronger constraint
than simply valid XML). Basically, with jing.jar accessible in the Java
path (https://relaxng.org/jclark/jing.html), it would just mean that
command for each file.xml:

java -jar jing.jar docbook.rng file.xml

docbook.rng comes from https://docbook.org/xml/5.2b09/rng/ (latest version
right now). There are other implementations than Jing, like
https://github.com/tlocke/prang in Python and
https://metacpan.org/pod/distribution/XML-LibXML/lib/XML/LibXML/RelaxNG.pod
in Perl. The latter reuses existing Perl dependencies (libxml2), but I have
no idea of the quality of that implementation (Jing is really the
reference).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200902/5381d024/attachment-0001.html>


More information about the lyx-devel mailing list