Samuel Thibault, on jeu. 22 févr. 2018 17:22:26 +0100, wrote:
> Michael Stahl, on jeu. 22 févr. 2018 16:59:21 +0100, wrote:
> > On 22.02.2018 16:36, Stephan Bergmann wrote:
> > > I was more hoping that there might be an established plain Python option 
> > > for XML processing?
> > 
> > FWIW, there is at least xml.etree.ElementTree and xml.dom.minidom in the
> > CPython bundled libs.
> > 
> >
> >
> An issue with these is that they do not keep source line numbers of the
> nodes.  That's really concerning for providing useful information to
> the programmer.

Also, they do not provide get_parent(), which makes it difficult to get
the XML path to generate suppressions: one has to parse the whole tree
to find where the culprit element is. I have benchmarked a bit over
the whole set of libreoffice .ui files with all thousands of warnings
triggered, this gets from 5s to 27s of processing time. That is still
very reasonable, so why not (and that will reduce once warnings are
fixed :) )

Now, it happens that the lxml build on windows seems hard, it's
apparently not actually supported by upstream :/

One thing that could be done is to make gla11y work with either
python's implementation and lxml's implementation (that's really easy),
and not build lxml on windows platforms.  That'd mean that windows
developers don't have .ui line information, only ids (unless they use
a system python with lxml), while unix developers always have .ui line

LibreOffice mailing list

Reply via email to