Summary: | MathML import should work even when no xmlns attribute is present | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | Philippe <beton.10.pjoyez> |
Component: | Formula Editor | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | NEW --- | ||
Severity: | enhancement | CC: | heiko.tietze, himajin100000, rb.henschel, vsfoote |
Priority: | medium | ||
Version: | 7.4.3.2 release | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.documentfoundation.org/show_bug.cgi?id=98827 | ||
Whiteboard: | |||
Crash report or crash signature: | Regression By: | ||
Bug Depends on: | |||
Bug Blocks: | 39750, 118765 |
Description
Philippe
2023-01-02 23:19:13 UTC
I don't think this would be appropriate. The XML Namespace (xmlns:) is significant to sm parsing as it declares the syntax of the content, and then for correctly holding its source in the resulting ODF archive. For example if we eventually were to extend the import filter parsing to include TeX / LaTeX (bug 96208), or maybe AsciiMath markups--the import parsers have to be able to identify the source formatting. The prescribed xmlns: for MathML flags this cleanly for clipboard import of MathML, it is needed to validate content. The RELAX NG schema, and I believe we are talking about this, has been introduced a while ago and we should support it. What do you think, Regina? (In reply to Heiko Tietze from comment #2) > The RELAX NG schema, and I believe we are talking about this, has been > introduced a while ago and we should support it. What do you think, Regina? Looks to me that RELAX NG still requires a DTD of the xmlns: tag for the content. I think, it is a valid enhancement request. It might be duplicate to bug 98827, at least strong related. From a user point of view such feature is important as it would allow to import <math> fragments. I would restrict the request to texts, which have <math> root element and start with <math>. The result might not be as expected because LibreOffice's MathML support is at version 2.0. But getting something the user then can edit is better than getting nothing. Regina, I think this is the same as bug 98827 which I logged. If you look in that bug, the xlmns in <math xmlns="http://www.w3.org/1998/Math/MathML"> is definitely optional and going forward with HTML5 will be seen less. It should be a simple fix, if you get <math>, assume it implies <math xmlns="http://www.w3.org/1998/Math/MathML"> This should be safe, because if LibeOffice just gets <math> it does not understand it and can do nothing. So you don;t lose anything by doing that... |