Michael. You have to take the span attributes into account of course but padding is fine for all tables I believe. Here we run into the discussion about what is technically correct and what works. In most applications it probably works whether you pad the cells or not. In terms of being technically correct, as in parsing data, padding is probably important. Think of the table as a table in a database. Here it is essential that the cells match the column headers. One thing though, we do not ever want to change the original table markup when we can help it so we are padding the Braille perhaps but the author's original markup should not be changed without a compelling reason to do so. There's a lot to consider here. Over analysis is possible but not likely. K -----Original Message----- From: liblouis-liblouisxml-bounce@xxxxxxxxxxxxx [mailto:liblouis-liblouisxml-bounce@xxxxxxxxxxxxx] On Behalf Of Michael Whapples Sent: Wednesday, March 26, 2014 8:31 AM To: liblouis-liblouisxml@xxxxxxxxxxxxx Subject: [liblouis-liblouisxml] Re: LibLouisUTDML and tables As I said actually looking at the MathML 2.0 specification when there are not enough mtd elements then the row should be padded. So for the mtable example what I have done is correct. If mark up is actually invalid, then I think LibLouisUTDML should raise an error. This is where my concern is, while my fix might be correct for MathML, is it correct for other types of table? Is it valid in all document formats to pad with additional cells when a row is missing cells? I am glad you think this approach is looking good, I sometimes get concerned that I spend too long on making sure something is the best approach and most correct way of doing something ("paralysis by analysis" is something I don't want to slip into). Michael Whapples On 26/03/2014 12:20, Keith Creasy wrote: > 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 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