IRT-Open-Source / scf

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

xslt error #46

Closed cazino closed 7 years ago

cazino commented 7 years ago

Hi,

Using scf version 0.9.2, I have a problem with a STL :

scf-0.9.2/modules/STLXML2EBU-TT/STLXML2EBU-TT.xslt:615: validity error : xml:id : attribute value {concat('SGN', .)} is not an NCName
                <tt:div style="defaultStyle" xml:id="{concat('SGN', .)}">
                                                                        ^
scf-0.9.2/modules/STLXML2EBU-TT/STLXML2EBU-TT.xslt:892: validity error : xml:id : attribute value {concat('sub', $SN)} is not an NCName
            end="{$end}">
                        ^
xmlXPathCompOpEval: function current-date not found
XPath error : Unregistered function
xmlXPathCompiledEval: evaluation failed
runtime error: file scf-0.9.2/modules/STLXML2EBU-TT/STLXML2EBU-TT.xslt line 287 element value-of
XPath evaluation returned no result.

I am not familiar with xslt transformations so I am kind of lost here.

Using scf version 0.2.4 (the version I usually use), it produces only the following error :

xsltproc scf-0.2.4/modules/STLXML2EBU-TT/STLXML2EBU-TT.xslt 1491467708_36188FRA_ST.stlxml.xml
scf-0.2.4/modules/STLXML2EBU-TT/STLXML2EBU-TT.xslt:879: validity error : xml:id : attribute value {concat('sub', $SN)} is not an NCName
            end="{$end}">

And the output TTML is much bigger but way far from being usable (some text is missing)

The STL is here : https://drive.google.com/open?id=0B60JiOl5bvMNc09ISUd6em9jMTg A shell script of what I am doing : https://drive.google.com/open?id=0B60JiOl5bvMNZXRYWmZNT1pqWE0 Regards.

andreastai commented 7 years ago

Thanks for the detailed and very helpful error description, @cazino. We will have a look at it asap. It may have to do with the handling of the grouping of subtitles through the SGN field in the TTI blocks of STL. We will use your STL file for debugging.

cazino commented 7 years ago

Ok, thank you for looking into this.

spoeschel commented 7 years ago

We were able to reproduce the problem and have tracked it down. A fix for this will be published soon.

Note: The above validity error messages are due to a bug in libxml2. I opened a respective bug.

andreastai commented 7 years ago

@cazino The issue should be resolved. Please let us know if this not the case.

cazino commented 7 years ago

Thank you very much for your work. But I am afraid it is not completely fixed : some text is missing in the TTML. In the STLXML file and in a <TF> element, the characters that precedes the first <space> element are dropped in the final TTML file. I am sorry to be unable to provide a PR, but this xslt transformation is hard for a xslt newbie.

andreastai commented 7 years ago

Thanks for your feedback @cazino. We will check this.

spoeschel commented 7 years ago

Thanks for checking the new version.

I was able to reproduce the mentioned problem. As it is unrelated to the actual issue here, I opened #47 and hence close this one.