[liblouis-liblouisxml] Re: LibLouisUTDML and tables

  • From: Keith Creasy <kcreasy@xxxxxxx>
  • To: "liblouis-liblouisxml@xxxxxxxxxxxxx" <liblouis-liblouisxml@xxxxxxxxxxxxx>
  • Date: Wed, 26 Mar 2014 12:20:17 +0000

Hi Michael.

Dealing with "invalid" markup in a graceful way is important. So, even if it is 
invalid to have empty or missing mtd elements LibLouis/LibLouisUTDML should be 
able to deal with it in a way that at least makes some sense. I like your 
approach.

I'll get you additional feedback concerning tables. Heba can help us with that 
since currently she is the main one working directly with APH transcribers.

Keith


-----Original Message-----
From: liblouis-liblouisxml-bounce@xxxxxxxxxxxxx 
[mailto:liblouis-liblouisxml-bounce@xxxxxxxxxxxxx] On Behalf Of Michael Whapples
Sent: Wednesday, March 26, 2014 7:24 AM
To: liblouis-liblouisxml@xxxxxxxxxxxxx
Subject: [liblouis-liblouisxml] LibLouisUTDML and tables

Hello,
The last couple of commits I made relate to tables with varying number of 
entries per row.

This was mainly in response to the illegal characters problem Brandon had in 
BrailleBlaster, which was caused by a mtable element with mtr elements with 
differing numbers of mtd elements inside them.

According to the MathML 2.0 standard, it appears that should an mtr be short of 
the correct number of entries on a row then it should pad it with empty mtd 
elements.

My fix does not quite do actual padding with empty mtd elements, but rather it 
accepts that the row has been finished and so will start a new row. I can put 
in padding to show the additional empty entries if desired.

This fix though could potentially apply to other table structures in a 
document. My reason for taking this route was to try and prevent having format 
specific code inside liblouisutdml (try and keep the format details in semantic 
action files), so this seemed the lesser of two evils.

Whilst this does not deal with rowspan and columnspan attributes, it does mean 
though that in these cases liblouisutdml will at least produce something 
sensible as output as it will understand there being less than the expected 
number of entries in a row.

Another possible concern I have is that if the first row of a mtable element 
does not have the full set of mtd elements (IE. less than other
rows) this might upset liblouisutdml. I will look at creating a fix to this 
potential issue unless someone comes back and says that it would not be valid 
MathML anyway.

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

Other related posts: