Hi Dennis, Dennis E. Hamilton schrieb:
For MathML in ODF 1.2 documents, a MathML root element must conform to [xml-names] and the root element must have a namespace declaration. Of course an embedded MathML element must also have a namespace binding as well. (This is in the section on Namespaces and the one that defines OpenDocument Documents.)
I do not really understand you. Which parts do you refer exactly? Do you mean a namespace is required for valid 'MathML 2.0'? Was it required for 'MathML 1.0'?
Also, schema validity, not DTD validity, is required.
So I should not care about a DTD and put "resolve MathML Names to unicode point on import" on my ToDo list?
THE TEST DOCUMENTS I notice that the usage on the web pages that demonstrate some of the tests, the pages are XHTML and the namespace is used on the <math> elements. In the .mml files themselves, there is no XML prolog at all in the ones I looked at. There is no DOCTYPE, there is no <?xml> and there are no prefixes.
Yes, that is the problem of the files in testsite.zip. And I'm looking what to do to make them readable in AOO.
I think if you add a DOCTYPE, you should still have an xmlns="http://www.w3.org/1998/Math/MathML" on the root element. But I think just adding the xmlns declaration should be sufficient for the tests to work.
The missing XML prolog is a small problem. That is an if-case in smdetect.hxx. For testing I have set the detection on "true" for all cases. You come across a missing xml prolog too, when you copy a formula from a web page, which uses MathJax. http://www.mathjax.org/demos/mathml-samples/
I have tested all combinations of Prolog yes/no - doctype yes/no - namespace yes/no. Only the namespace makes the difference whether AOO is able to understand the files. I thought a general solution would come in handy and makes AOO more tolerant in using MathML fragments.
If for some reason, xmlns:math="http://www.w3.org/1998/Math/MathML" appears to be required, that is probably because there is an old parser being used and it isn't actually doing namespace processing correctly.
That is the question. Is there actually a place I can correct the missing namespace problem? If it is not possible, I need not look for it.
Is this helpful?
Your input is always welcome, especially when I'm going round in circles ;) Kind regards Regina
- Dennis -----Original Message----- From: Regina Henschel [mailto:rb.hensc...@t-online.de] Sent: Tuesday, December 16, 2014 07:19 To: AOO dev Subject: Need help in the code jungle of starmath Hi all, I try to use the MathML testsuite http://www.w3.org/Math/testsuite/mml2-testsuite/. But those files do not open in Math and cannot be imported. I find, that all files fail, which do not have the namespace xmlns="http://www.w3.org/1998/Math/MathML" as attribute in the root element math. This error remains, if I force the type detection to accept those files for the MathML filter. If the namespace is missing, I get the error "Root element unknown" in the parser. From a standard view this namespace is not necessary. It is enough to have a doctype, and in case of doctype http://www.w3.org/Math/DTD/mathml1/mathml.dtd an xmlns attribute is not even known. So, does anyone know (1) Where is the part, which insists on the xmlns attribute? (2) Is there a way to deliver this information to the parser, when it is missing in the file? Kind regards Regina
--------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org For additional commands, e-mail: dev-h...@openoffice.apache.org