[brailleblaster] Re: Summary of document viewer/editor stuff

  • From: Michael Whapples <mwhapples@xxxxxxx>
  • To: brailleblaster@xxxxxxxxxxxxx
  • Date: Wed, 09 Jun 2010 19:57:55 +0100

I sort of understand how liblouisxml may help in replacing XSLT (whether I agree whether that is a wise move or not is something I am unsure of but possibly not qualified to really make a bold statement either way). I really don't understand how liblouisxml could possibly replace an XML DOM.


So if you were saying that liblouisxml could replace a XML DOM, I really could do with further explanation (thinking in the academic language I am getting used to again, the words compare and contrast come to mind for what I am asking).

Michael Whapples
On 06/09/2010 07:13 PM, Yuemei Sun wrote:
First, many thanks to Michael for providing a wealth of information. That's a great start point for me, as I am doing the catching up. John, would you mind explain it again (or resend your past message)? Thanks,

Yuemei

John J. Boyer wrote:
What is asciimath?

Besides the methods of handling xml suggested we should also look at how liblouisxml does it. That could save a lot of work and reduce the nuumber of separate components. It would also eliminate any need for xslt. It will probably be used int the braille-side editor in any case. I've explained this in past messages and can explain it again.

John B.

On Wed, Jun 09, 2010 at 10:46:38AM +0100, Michael Whapples wrote:
Hello,
Yuemei asked me about the things for MathML and the XML editor. Here is a quick summary of what I understand: * For showing the document content it looks like SWT's StyledText control may be enough. This control can show images in the text (see the eclipse SWT snippet212 embedding images in StyledText) and also can be made to take other SWT widgets (see eclipse SWT snippt217 Embedding widgets in StyledText). StyledText also allows you to specify fonts and adjust the style (eg. background colour, etc) of a given range of text within the control. * Should StyledText pose issues in not being flexible enough (I don't know whether this is a concern or just backup, also yes it is something new I am adding) then we could look at creating a custom control, this can be made accessible in SWT (see eclipse SWT snippet334). * For showing MathML, one promising java library looks like jeuclid (http://jeuclid.sf.net). While on the home page it says there is an SWT widget I don't know much about that, if push comes to shove we can just use jeuclid to create an image and insert that. * For generating MathML when a user inserts maths, we were thinking to go with the commonly used input method of LaTeX or a LaTeX like syntax which is written in plain text so not causing accessibility issues. One option is itex2MML (http://golem.ph.utexas.edu/~distler/blog/itex2MML.html <http://golem.ph.utexas.edu/%7Edistler/blog/itex2MML.html>) which doesn't strictly use LaTeX for input (its basically LaTeX with minor tweaks to make it easier to convert to mathml). Itex2MML is written in C as far as I know so would need a Java binding written for it. An alternative (I certainly am not ruling it out) is snuggletex (http://snuggletex.sf.net) which has the one great advantage its written in Java so doesn't need any Java bindings writing for it. I think there has been a little bit of a comment of should we tie ourselves at the moment to LaTeX, eg. what about asciimath (while the following isn't suitable being javascript, I think it shows the format for input http://www1.chapman.edu/~jipsen/mathml/asciimath.html <http://www1.chapman.edu/%7Ejipsen/mathml/asciimath.html>). * There was question over what we do if the document comes from somewhere with no LaTeX source, as LaTeX source (or if we use asciimath, then asciimath) for the alt-tag (with StyledText we would insert the alt-tag as text and having the image for that range of text I think, this was where a visual check would be useful as snippet 212 only associates images with one character). One thought was simply state the equation exists but not try and give detail (not so satisfying as its not really accessible). Another thought is try and convert back from MathML. Now I did some searches on this, little current stuff came up, some it wasn't clear what the license was, etc. One which looked promising (from what they claim on the website), if a little unmaintained due to last release date, is xsltml (http://xsltml.sf.net). John Boyer doesn't seem to be taken by the idea of XSLT and said he probably could get liblouisxml to translate to LaTeX, I will admit I haven't used XSLT but would imagine that it should be usable in Java as its so popular. I will leave how the conversion will be done to those who know. So the question is if we convert back to LaTeX, it would seem appealing to let the user edit it, but what if back conversion doesn't match forward conversion, potentially the user may end up with a new equation without altering the LaTeX! * Dealing with XML: Up to now I haven't mentioned how we will do XML, StyledText doesn't deal with XML. You are probably used to the two typical XML ways, SAX parser and DOM. As we are looking for an editor, DOM seems the correct choice. I am unsure whether Java has an XML DOM package built in the standard JVM, it doesn't matter if it doesn't, we have options like jdom (http://jdom.org) and dom4j (http://dom4j.sf.net). In fact that answers my Java and XSLT question, dom4j claims to do it. I don't know whether these were the sorts of things which were being meant, I imagine we would need to do a lot of custom stuff regardless of what we use.

Now I think that covers everything up to now.

Michael Wahpples




Other related posts: