XLIFF 1.2 File Type support in WorldServer 11.1.1

The XLIFF 1.2 File Type is now supported starting with WorldServer 11.1.1. While this file type is not activated by default, you can activate it by running a script on your WorldServer database. You can find the activation and deactivation scripts attached to this post, along with a list of known issues.

To activate the XLIFF file type, download and run one of the following scripts, depending on the relational database management system you use. You can dowload scripts by clicking their name in the upper-right corner of the preview:

  • activateXLIFFFilter.ms.sql (for Microsoft SQL Server databases)

/*
 Script to activate the XLIFF 1.2 filter
 */
BEGIN
  DECLARE @icount INT;

  SELECT @icount = count(filterInfoId)
  FROM filterInfos
  WHERE name LIKE 'XLIFF 1.2 File Type' AND filterInfoId = 72

  IF (@icount = 0)
    BEGIN
      PRINT '-->Activating XLIFF 1.2 filter'

      INSERT INTO filterInfos
      (filterInfoId, name, filterClass, type)
      VALUES
        (72, 'XLIFF 1.2 File Type', 'com.idiominc.ws.filters.fts.FSXLIFFv1_2ProxyFilter', 2)

      INSERT INTO mediaTypes
      (mediaTypeId, mediaType, description, isText, defaultExtension, externalMediaType, filterInfoId) values
      (46, 'text/xlif', 'XLIFF 1.2 File', 1, 'xlif', 'text/xlif', 72);

      INSERT INTO mediaTypeMappings (path, extension, mediaTypeId) VALUES
      ('', 'xlif', 46);
    END
  ELSE
    BEGIN
      PRINT '-->XLIFF 1.2 filter already activated'
    END

END;

  • activateXLIFFFilter.ora.sql (for Oracle databases)

/*
 Script to activate the XLIFF 1.2 filter
 */
DECLARE
  tcount INTEGER;
BEGIN
  SELECT count(filterInfoId)
  INTO tcount
  FROM filterInfos
  WHERE name LIKE 'XLIFF 1.2 File Type' AND filterInfoId = 72;

  IF (nvl(tcount, 0) = 0)
  THEN
    dbms_output.put_line('-->Activating XLIFF 1.2 filter');

    INSERT INTO filterInfos
    (filterInfoId, name, filterClass, type)
    VALUES
      (72, 'XLIFF 1.2 File Type', 'com.idiominc.ws.filters.fts.FSXLIFFv1_2ProxyFilter', 2);

    INSERT INTO mediaTypes
    (mediaTypeId, mediaType, description, isText, defaultExtension, externalMediaType, filterInfoId) VALUES
    (46, 'text/xlif', 'XLIFF 1.2 File', 1, 'xlif', 'text/xlif', 72);

    INSERT INTO mediaTypeMappings (path, extension, mediaTypeId) VALUES
    ('', 'xlif', 46);
  ELSE
    dbms_output.put_line('-->XLIFF 1.2 filter already activated');
  END IF;
END;
/
commit;

After activating the XLIFF file type, you need to configure its corresponding MIME type on the Management > Administration > Customization page.

If necessary, you can deactivate the XLIFF file type by running one of the following scripts, depending on the relational database management system you use:

  • deactivateXLIFFFilter.ms.sql (for Microsoft SQL Server databases)

/*
 Script to disable the XLIFF 1.2 filter
 */
BEGIN
  DECLARE @icount INT;

  SELECT @icount = count(filterInfoId)
  FROM mediaTypes
  WHERE filterInfoId = 72

  IF (@icount = 1)
    BEGIN
      PRINT '---> Deleting the usages of XLIFF 1.2 File Type'

      DELETE FROM mediaTypeMappings
      WHERE mediaTypeId = 46

      DELETE FROM filterGroupEntries
      WHERE mediaTypeId = 46

      DELETE FROM mediaTypes
      WHERE mediaTypeId = 46 and filterInfoId = 72

    END;

  SELECT @icount = count(filterInfoId)
  FROM filterInfos
  WHERE name LIKE 'XLIFF 1.2 File Type' AND filterInfoId = 72

  IF (@icount = 1)
    BEGIN
      PRINT '-->Disabling XLIFF 1.2 filter'

      DELETE FROM filterInfos
      WHERE name LIKE 'XLIFF 1.2 File Type' AND filterInfoId = 72

      DELETE FROM fileTypeInformation
      WHERE filterName = 'XLIFF 1.2 File Type';
    END
  ELSE
    BEGIN
      PRINT '-->XLIFF 1.2 filter already disabled'
    END;

END;

  • deactivateXLIFFFilter.ora.sql (for Oracle databases)

/*
 Script to disable the XLIFF 1.2 filter
 */
DECLARE
  tcount INTEGER;
BEGIN

  SELECT count(filterInfoId)
  INTO tcount
  FROM mediaTypes
  WHERE filterInfoId = 72;

  IF (nvl(tcount, 0) = 1)
  THEN
    dbms_output.put_line('---> Deleting the usages of XLIFF 1.2 File Type');

    DELETE FROM mediaTypeMappings
    where mediaTypeId = 46;

    DELETE FROM filterGroupEntries
    WHERE mediaTypeId = 46;

    DELETE FROM mediaTypes
    where mediaTypeId = 46 and filterInfoId = 72;
  END IF;

  SELECT count(filterInfoId)
  INTO tcount
  FROM filterInfos
  WHERE name LIKE 'XLIFF 1.2 File Type' AND filterInfoId = 72;

  IF (nvl(tcount, 0) = 1)
  THEN
    dbms_output.put_line('-->Disabling XLIFF 1.2 filter');

    DELETE FROM filterInfos
    WHERE name LIKE 'XLIFF 1.2 File Type' AND filterInfoId = 72;

    DELETE FROM fileTypeInformation
    WHERE filterName = 'XLIFF 1.2 File Type';

  ELSE
    dbms_output.put_line('-->XLIFF 1.2 filter already disabled');
  END IF;

END;
/
commit;

For information about the default XLIFF settings, see the SDL Trados Studio documentation.

Known issues:

  • When you try to view or modify the settings of an XLIFF configuration, the page is not loaded. This is due to the fact that Microsoft Silverlight will no longer be supported. As a workaround, configure the file type in SDL Trados Studio and import it into WorldServer.
  • The source and target languages of the assets segmented with XLIFF configurations are not identified automatically when you create projects. For example, even though an XLF asset might have "en-us" as a source language and "de-de" as a target language, you can still include it in a project with a different language pair.
  • You cannot save XLF assets that contain <mrk mtype="protected"> or CData (section) placeholders in Browser Workbench. As a workaround, before you translate segments that contain such placeholders, copy the source content to the target segments.