[liblouis-liblouisxml] Cause of wrong order of brl node issue

  • From: Michael Whapples <mwhapples@xxxxxxx>
  • To: brailleblaster@xxxxxxxxxxxxx, liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Tue, 11 Mar 2014 12:59:23 +0000

Hello,
I have no fix for this yet but I have identified the circumstances under which it will occur. It actually reveals two possible issues.

It appears if one has either side of an empty span (<span/>) words which would normally lead to a contraction with the space between words being removed (eg. "of the", "with the", "and the", etc) and the space is before the span, then liblouisutdml is appending the translation from the node after the span to the brl node for the text before the span. So some examples which cause this are: "of <span/>the", "with <span/>the" and "and <span/>the".

I don't know whether the issue is in liblouisutdml or whether it is further down in liblouis leaving things in a particular state which upsets liblouisutdml. We certainly need to fix this as its a bug causing invalid UTD.

The second issue it highlights is that whilst the Braille is being combined from either side of the span, the space is not being removed. I am not sure whether we can really fix this issue, at least not without context of what the next text will be, even if that text comes from another XML element. Also whilst the translation is wrong, at least it is understandable by readers and will not cause software issues.

I have attached a very minimal example of the issue.

Michael Whapples
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dtbook xmlns:m="http://www.w3.org/1998/Math/MathML"; 
semantics="action,no"><book semantics="style,document"><p 
semantics="style,para">of <brl index="0 2 4"><newpage brlnumber="1"/><newline 
xy="30,10"/>⠷⠀⠮</brl><span semantics="action,no"/>the<brl><newline 
xy="20,18"/></brl></p><brl><newline xy="155,202"/><span class="brlonly">   
1<brl>⠀⠀⠀⠼⠁</brl></span><newpage brlnumber="2"/></brl></book></dtbook>
<dtbook xmlns:m="http://www.w3.org/1998/Math/MathML";><book>
<p>of <span/>the</p>
</book></dtbook>

Other related posts:

  • » [liblouis-liblouisxml] Cause of wrong order of brl node issue - Michael Whapples