FastSaxParser ans XFastParser

Regina Henschel rb.henschel at
Fri Nov 27 00:20:34 UTC 2020

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> 
> <> 
> 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

The downloaded file is then unpacked to
workdir/UnpackedTarball/libxml2. That has some documentation. Besides 
that you find infos on the project site

"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

More information about the LibreOffice mailing list