IRT-Open-Source / scf

Subtitling Conversion Framework
Apache License 2.0
52 stars 18 forks source link

EBU-TT-D2EBU-TT-D-Basic-DE: Missing style reference for text not in a tt:span #8

Closed andreastai closed 8 years ago

andreastai commented 9 years ago

When in a EBU-TT-D document text nodes are direct children of the tt:p element they should be "wrapped" by a tt:span element through the transformation to EBU-TT-Basic-DE. Although this is done correctly the resulting span has a style attribute with no value.

Example:

EBU-TT-D Source:

     <tt:p 
            xml:id="sub1"
            region="defaultRegion"
            begin="00:00:00.000"
            end="00:00:02.000">Test text<tt:br/><tt:span>Test text 2nd line</tt:span></tt:p>

Result

       <tt:p xml:id="sub1" style="textCenter" region="bottom" begin="00:00:00.000"
            end="00:00:02.000">
            <tt:span style="">Test text</tt:span>
            <tt:br/>
            <tt:span style="textWhite">Test text 2nd line</tt:span>

Should be

       <tt:p xml:id="sub1" style="textCenter" region="bottom" begin="00:00:00.000"
            end="00:00:02.000">
            <tt:span style="textWhite">Test text</tt:span>
            <tt:br/>
            <tt:span style="textWhite">Test text 2nd line</tt:span>
andreastai commented 8 years ago

Fixed with 483932678ee51029405897cb565b51ffc5512ae9