Re: FastSaxParser ans XFastParser

2020-11-27 Thread Michael Stahl

On 27.11.20 01:20, Regina Henschel wrote:
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.


true, but
* FastParser doesn't use XDTDHandler, it's only used with the "old" 
expatwrap parser that isn't "fast".
* XDTDHandler is only for unparsed entities, whereas here internal 
entities would be required and those are always parsed entities


there isn't any UNO API for internal entities.

the internal entities should be handled by libxml2 itself, the problem 
is that the DTD isn't read (it's not bundled?) so they aren't declared.


so i guess you could either figure out how to get this DTD bundled (note 
that there are different versions of MathML, and that you should ask 
your local Debian Developer what they think about its license before 
bundling it), or to provide these entities as built-in via some hook as 
Noel proposed in https://gerrit.libreoffice.org/c/core/+/106630.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: FastSaxParser ans XFastParser

2020-11-26 Thread Noel Grandin

Hi

So...

(*) XFastParser is "just" an interface, specifically, one of our UNO interfaces.

(*) Which means that the XFastParser header files are generated from the 
XFastParser.idl file in offapi/

(*) FastSaxParserImpl is the implementation of the XFastParser interface

(*) There are other things that implement the XFastParser interface, but mostly 
they just pass through to FastSaxParserImpl.

(*) internally, FastSaxParserImpl uses the SAX API that is part of libxml2, 
which is an external package/library that we use

(*) libxml2 is documented here: http://www.xmlsoft.org/

(*) XFastParser is fairly complicated because it is intended to be a high-performance parser, for loading large 
spreadsheets and documents and the like.



Regards, Noel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: FastSaxParser ans XFastParser

2020-11-26 Thread Regina Henschel

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*  
 
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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: FastSaxParser ans XFastParser

2020-11-26 Thread Andrew Pitonyak
I think that it is an external package. Search for libxml c++

so does my expectation that you need to install it and then make sure that your 
library includes no to look where it is installed. The latter part might come 
for free depending on your environment. For example, I'm Linux I probably could 
use dnf install  libXML and then everything would just work. But I'm just 
guessing.

Hopefully this at least gives you a place to look

⁣Sent from BlueMail ​

On Nov 26, 2020, 5:38 PM, at 5:38 PM, "Dante Doménech" 
 wrote:
>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* 
>
>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?
>
>
>
>
>___
>LibreOffice mailing list
>LibreOffice@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


FastSaxParser ans XFastParser

2020-11-26 Thread Dante Doménech
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* 

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?
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice