Hello,I don't know how many people would be interested in the actual internal workings of liblouis. I just wondered if there was a document you had used to understand the algorithm before putting it into practice in liblouis. I probably was spoilt with the information about the working of BrailleTrans, Alisdair King probably had to (almost certainly had to) write the explanation of how it worked.
As for how applications create XML, I am not sure, I would probably head to something like a package providing an XML DOM (the python ones can read and write XML). I can't name specific ones as I don't do C, Java and Python are my main things.
As for liblouisxml putting things together, it sounds like it is the ugly way I could think of doing it.
Michael Whapples On 17/12/09 19:57, John J. Boyer wrote:
Michael, Explaining how liblouis and liblouisxml work internally would require new sections in the documentation. Are there good ways to describe algorithms. I'm looking for the algorithms that various applications use to generate xml files. This will be needed for the Universal Tactile Document language that ViewPlus is considering. liblouisxml joins bits of text etc. by calling liblouis with appropriate translation tables, then concatenating its output separated by spaces in a buffer. This buffer is then passed to the formatter, which may use an editing table, also a liblouis table, to clean up the places where math joins text, etc. .sem files are peculiar to liblouisxml. They were designed for simplicity and flexibility. John On Thu, Dec 17, 2009 at 06:25:14PM +0000, Michael Whapples wrote:Hello, This sort of leads me to another thing I have been intending to ask. Where could I find a bit more about how liblouis works internally? Please remember I am not a C programmer so the source code won't mean much to me. Also how does liblouisxml get liblouis to join the bits of text? As an example of what I mean, say I have two mathematical fragments (2x and ax), I think the mathml would be<mn>2</mn><mi>x</mi> and<mi>a</mi><mi>x</mi>. How does liblouisxml make the letter sign appear before the x in the first case but not appear in the second? Regarding the XSLT, possibly a good thing, may be already known by more people. Is the .sem files used by liblouisxml a standard system used else where? Michael Whapples On 16/12/09 15:51, John J. Boyer wrote:Christian, There hasn't been much to say since we ran out of ideas on why liblouisxml wouldn't compile under Windows. The problem is probably something minor, but who knows what. We really need a skilled Windows programmer! I'll be glad to see your xslt extension and python code in the repository. Making The .sem files able to handle xpath expressions is a good idea. My xslt programming job was to convert complex docbook files into dtbook with proper indication of computer code, sections, a table of contents, etc. I'm not sure I did very well. John On Wed, Dec 16, 2009 at 02:07:12PM +0100, Christian Egli wrote:Hi John Good to hear from you. It's been lonely and quiet on the list lately :-) "John J. Boyer"<john.boyer@xxxxxxxxxxxxxxxxx> writes:A lot of people are using liblouis directly in their applications without liblouisxml . So I think it would be nice if you put your code in a subgrectory of the python directory in the liblouis repository.I will do so, but probably not before the end of the year.I hope the political problems will be resolved soon. liblouisxml will, of course, eventually have multi-volume capability. For those who do not have such concerns, it is by far the simplest approach, since it handles dtbook xml directly, without need for conversion.That is one of the benefits that it works out of the box.I must confess that I had to do xslt programming on one job, and I found it the most difficult language I have ever encountered. The .sem files of liblouisxml provide a much simpler means of handling different xml languages. They also are essential for handling MathML and provide other features.Hehe, I like programming in xslt, as long as you simply do transformations and leave the real work to extensions (such as the liblouis extension). The .sem files are very simple and do their job but in my view they are a bit too limiting for some scenarios. I think a lot could be gained if the .sem files allowed for specification of an xpath instead of the element, element+attribute or element+attribute+value tuples. What if you want a semantic action on an attribute solely (like for example xml:lang)? What if you have recursive xml structures (like 'level' inside 'level' in DTBook). These could much easier be dealt with if the .sem files accepted xpath expressions. I haven't really looked into it but I could imagine that since libxml2 supports xpath this should be doable. Thanks -- Christian Egli Swiss Library for the Blind and Visually Impaired Grubenstrasse 12, CH-8045 Z??rich, Switzerland For a description of the software and to download it go to http://www.jjb-software.comFor a description of the software and to download it go to http://www.jjb-software.com
For a description of the software and to download it go to http://www.jjb-software.com