Dante Doménech schrieb am 26-Nov-20 um 23:37:
Hello.
I'm sorry for asking stuff like this, but I'm not a full fledged
developer and stuff like this is quite hard for me.
Starmath mathml is supposed to use FastSaxParser (or I understand that).
At least changes on FastSaxParserImpl will have repercussions on it.
However, on mathmlimport.cxx we do use XFastParser. However
FastSaxParser is a child class of XFastParser, so changes on it should
not have repercussions on it's parent.
So, what are we actually doing? And how has this stuff to be treated?
Or at least some kind of documentation emplaining which kind of process
are we using.
If you try to copy paste the code outside to do some customized parser,
it will break. There is that #*include* <libxml/parser.h>
<https://opengrok.libreoffice.org/xref/core/sax/source/fastparser/fastparser.cxx?r=93c64a61#50>
which there is nowhere to be found (opengrok also fails in looking for
it). There is no such file inside the only libxml directory to be found
and the others files with that name don't seem to be related by the
stuff that breaks when removed: xmlEntity, xmlEntityPtr, xmlChar, ...
xml basic definitions.
So, does anyone know which file is it?
The library libxml2 belongs to the externals. The source was downloaded,
when you first build LibreOffice to the place which you have specified
in an autogen parameter. For me it is
--with-external-tar=/cygdrive/d/Build_forCommit/externalsrc
The downloaded file is then unpacked to
workdir/UnpackedTarball/libxml2. That has some documentation. Besides
that you find infos on the project site http://www.xmlsoft.org/
"workdir" exists only in your build, not in Opengrok.
BTW, "workdir" contains some other interesting information, e.g. the
relationship between numbers (as seen in Visual Studio) and tokens or
properties for module oox in workdir/CustomTarget/oox/generated\oox/token/
core/external/libxml2/ contains only makefile and some patches.
I'm neither familiar with module starmath nor sax parser, but as far as
I know, starmath currently does not use character entities at all. So
you are entering new territory, so to speak.
The API has an interface XDTDHandler in com::sun::star::xml::sax with
the methods "notationDecl" and "unparsedEntityDecl". An OpenGrok search
leads to /core/sax/source/expatwrap/sax_expat.cxx. So it seems you need
to implement a class which supports this interface. But I'm still a
novice in many aspects and it would be better a professional developer
gives you ideas for further steps.
Kind regards
Regina
_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice