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.
https://docs.python.org/3/library/xml.etree.elementtree.html
https://docs.python.org/3/library/xml.dom.minidom.html
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
information.
Samuel
Context
- Re: Implementing accessibility non-regression check tool (continued)
Re: Implementing accessibility non-regression check tool · Stephan Bergmann
Re: Implementing accessibility non-regression check tool · Samuel Thibault
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.