IRT-Open-Source / scf

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

STLXML2EBU-TT error with xsltproc #49

Closed braincoded closed 6 years ago

braincoded commented 6 years ago

I'm trying to do the XSLT conversion step from STLXML -> EBU-TT using xsltproc under Ubuntu 16.04 by calling:

xsltproc STLXML2EBU-TT.xslt STLXML.xml > EBU-TT.xml

xsltproc --version
Using libxml 20903, libxslt 10128 and libexslt 817
xsltproc was compiled against libxml 20903, libxslt 10128 and libexslt 817
libxslt 10128 was compiled against libxml 20902
libexslt 817 was compiled against libxml 20902

However, the process terminates with the following error messages:

STLXML2EBU-TT.xslt:669: validity error : xml:id : attribute value {concat('SGN', .)} is not an NCName
        <tt:div style="defaultStyle" xml:id="{concat('SGN', .)}">
                                                                ^
STLXML2EBU-TT.xslt:969: validity error : xml:id : attribute value {concat('sub', $SN)} is not an NCName
            end="{$end}">
                        ^
XPath error : Invalid expression
number($offsetTCP) eq 1
                   ^
compilation error: file STLXML2EBU-TT.xslt line 874 element when
xsl:when : could not compile test expression 'number($offsetTCP) eq 1'
XPath error : Invalid expression
string-length($tcp) ne 8
                    ^
compilation error: file STLXML2EBU-TT.xslt line 876 element if
xsl:if : could not compile test expression 'string-length($tcp) ne 8'

Are there any suggestions on how to solve this issue?

THX!

andreastai commented 6 years ago

Thanks for your detailed and exact problem description, @braincoded! We will look into this issue and come back to you as soon as possible.

spoeschel commented 6 years ago

This is indeed a bug on our side: The parts that raise the errors are not compliant to XML/to XSLT 1.0. We will release a fix for this soon.