[liblouis-liblouisxml] Having a callback semantic action in liblouisutdml

  • From: Michael Whapples <mwhapples@xxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Thu, 03 Jan 2013 16:00:06 +0000

Hello,
I am wondering whether it would be possible to have a callback semantic action in liblouisutdml where the callback function will provide alternative XML for the element for liblouisutdml to use.

Such a use would be in processing word document files when an OLE object, I have MathType objects particularly in mind, are encountered. On encountering the element, liblouisutdml would call the specified callback (ideally a C callback function, but if that's too hard may be a shell execution of a command), passing it the element and sub-element XML, and the callback would return the substitution XML for liblouisutdml to use.

Would such a feature be difficult to implement? I know for myself using python or Java this would not be too complicated to add to a library written in those languages but C is not one of my strong points.

Yes I know that may be pre-translation conversion could achieve the same result, but say in the MathType case, substituting the MathML in to the OpenXML would probably break the file so that it would not work in word and also for OpenXML may not be legally permitted by the license Microsoft impose on the format.

Michael Whapples
For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts: