Question

I'm investigating about XLIFF, and for a start, wanted to have some tests with HTML files. I found an XSL Transformation at OASIS, which produces XLIFF files from HTML files. But the resulting XLIFF files contains elements and attributes belonging to a tek name‑space, which OpenLanguageTools XLIFF Editor seems to not enjoy. I, myself, have issue trying to validate it against the xliff-core-1.2-strict.xsd schema.

I wonder what's that tek name‑space, whose identifier is http://www.tektronix.com/TC . I searched the web, but could found nothing relevant.

Is this a standard extension to XLIFF? Is this legacy or actual?

Update #1: What troubles me a lot, is that the URL seems not valid any‑more, and redirects to www.tek.com now, while there seems to be still many sample XLIFF documents holding elements from to that name‑space.

Was it helpful?

Solution

tek stands for Tektronix indeed. Although you didn't provide the resulting Xliff, but I guess the reason that you're not able to validate it against the Xliff core schema is that your document has two namespaces; the original Xliff namespace and a custom namespace called tek which is used to add customized vocabulary to the file.

Here is a foo example:

<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" 
       xmlns:foo="http://www.foobar.com"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
       xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2         
       xliff-core-1.2-strict.xsd http://www.foobar.com foo.xsd" 
       version="1.2">

Then you can have:

   <trans-unit id="0" restype="button" resname="big_red_button">
       <foo:serious-note>Srsly!</foo:serious-note>
       <source xml:lang="en-US">Don't push here!</source>
       <target state="needs-translation></target>
   </trans-unit>

And as long as you add this customized tag to your schema, you can validate the file using both Xliff schema and your customized schema:

<xsd:element name="serious-note">
    <xsd:complexType>
        <xsd:simpleContent>
            <xsd:extension base="xsd:string">
                <xsd:attribute ref="xml:lang" use="optional"/>
                <xsd:attribute name="foobar" type="xsd:string" use="optional"/>
            </xsd:extension>
        </xsd:simpleContent>
    </xsd:complexType>
</xsd:element>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top