Quick follow-up :
While this method produces documents whose MathML perfectly works in
lowriter, there is a minor difference between the way the xml is written
this way, and by the math component (i.e. by using libreoffice to
produce a document)
- in a libreoffice produced document (1), mathml element is using a
default namespace put on the parent math element
- in a document produced with the aforementioned method (2), each mathml
element uses a qualified name.
ie, in case (1) :
<math xmlns="http://www.w3.org/1998/Math/MathML" >
<semantics>
<mrow>
<mi>z</mi>
...
in case (2) :
<math:math>
<math:semantics>
<math:mrow>
<math:mi>z
...
or
<math:math xmlns="http://www.w3.org/1998/Math/MathML">
<math:semantics>
<math:mrow>
<math:mi>z
...
I understand that the meaning is the same in all alternative writings
but I would prefer producing results like (1), using a default namespace
for all math descendants and I cannot find a way to do that in
odftoolkit, having tried various createElement / createElementNS
incantations.
It might be more of a java dom question than a odftoolkit question, but
any idea or pointer would be appreciated!
V.
On 22/01/2024 11:12, vivien guillet wrote:
On 19/01/2024 21:09, Michael Stahl wrote:
not only the math node must be in the math namespace but all of the
descendants like "semantics" too - i think that's the most likely
explanation: create every element with the namespace.
That was it ! Thanks a lot.
Vivien
--
To unsubscribe e-mail to: dev+unsubscribe@odftoolkit.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.odftoolkit.org/dev/
Privacy Policy: https://www.documentfoundation.org/privacy
Context
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.