• Show convenient version of this site
  • Deutsch
  • English
Contact
Newsletter
  • Products
    • ALS
      • Across Language Server
        • Translation Management
        • Terminology Management
        • Translation Memory
      • Editions
      • Interfaces
    • ATE
      • Across Translator Edition
      • Editions
      • Download
      • Across Account
    • Elanion
      • Overview
      • Login
  • Solutions
    • Customers
      • Enterprises
      • Language Service Providers
      • Translators
    • Industries
      • E-Commerce & Trade
      • Pharmaceuticals & medicine
      • IT & Software
    • Departments
      • Marketing & E-Commerce
      • Technical Documentation
      • Software User Interfaces
  • Services
    • Hosting
    • Training
    • Consulting
  • Partners
    • Language Service Providers
    • Universities
  • Company
    • Across Systems
    • News
    • Events
    • Career
    • Contact
  • Knowledge
    • Blog
    • Video Library
    • Case Studies
    • White Papers
    • Fact Sheets
    • File Formats
    • Expert Features
  • Support
    • New Functions
    • Online Help
    • FAQ
    • Support Request
    • Updates
Schedule Consultation
  • Online-Help
  • SDK
  • Connecting Third-party Systems
  • crossConnect for External Editing
  • Implementation
  • Sample code - Integrated solution
  • General Information
    • Connectors
    • LCIDs
    • GUIDs
    • Paragraph states and flags
    • crossTerm Web
    • crossTransform
      • crossTransform - examples
  • Connecting Third-party Systems
    • crossConnect for content systems
      • Requirements
      • Configuration
        • Configuring the connector
        • Job configuration
        • Testing crossConnect
      • Troubleshooting
    • crossConnect for External Editing
      • Purpose and usage
        • Use case - Machine translation
        • Use Case - Review and QA
        • Use case - Machine review
      • Requirements
      • Implementation
        • Across XLIFF format
          • Across-specific Extensions
          • <xliff> Element Attributes
          • <file> Element Extensions
          • <trans-unit> Element Extension
          • Paragraph States
          • Paragraph State Flags
          • <source> and <target> Element Content
          • <bpt> Element Attributes
          • <ph> Element Attributes
          • <x> Element Attributes
          • Across-specific Properties
          • Analysis Results
          • Sample Files
          • Across XLIFF - import, export and segmentation
          • Context information
          • Exporting best matches in Across XLIFF
          • Hyperlinks to XLIFF
        • Secure file handling with C#
        • Secure file handling with JAVA
        • Workflow and vendor configuration
          • Adding workflows to crossAutomate Host Manager
          • Adjusting preset watchfolders
          • The filter rules
          • External editing workflows
        • Sample code - Integrated solution
    • Generic File Connector
      • Process Overview
      • Exchange Folder Structure
      • Package Format
        • Control File
  • Display Texts
    • Solution approaches
    • The Across solution in detail
    • Requirements
    • Integration
    • The display text format
      • Line height vs. line spacing
      • DT-XML format structure
        • DT-XML - Main elements
        • Children of paragraphStyles and characterStyles
        • Children of the sizeInfos element
        • Children of the paragraph element
        • DT-XML v5 example
        • DT-XML v4 example
    • The display text package
      • Creating a display text package
  • APIs
    • APIs - Technology
    • crossTank API v1
      • Requirements
      • Testing the crossTank API installation
      • OData-URLs in Chrome
      • Example
    • crossTank API v2
      • Requirements
      • QuickStart
        • Searching for Translations
        • Creating Translations
      • crossTank API v2 Overview
        • Finding Translations
        • Creating Translations
        • Translation Properties
        • Formatting and Auto-Adjustment of Formatting and Numbers
      • C# Example
    • crossTerm API v1
      • Scenarios of use
        • Example - usage information
        • Example - finding terms
      • Requirements
      • Special Controllers
      • OData-URLs in Chrome
      • crossTerm API with C#
      • crossTerm API with Java
      • crossTerm API with JavaScript
    • crossTerm API v2
      • Requirements
      • QuickStart
        • Authentication Basics
        • First Request Examples
      • crossTerm API v2 Example in C#
        • Used Functions
      • crossTank API, crossTerm API v2 - Authentication
      • crossTerm API v2 - Examples of Use
        • Finding Terms of Entry
        • Searching Terminology via API
    • crossAPI SI
      • Requirements
      • Function Return Types
      • crossAPI SI and Java
        • Example: hot integration
        • Executing the hot integration example
      • List of Objects in crossAPI SI
        • AssignManager
        • Authorization
        • CheckInManager
        • CheckOutManager
        • CrossTankManager
        • CrossTermManager
        • DocumentManager
        • FileManager
        • LanguageJobManager
        • LanguageManager
        • LicenseManager
        • Message
        • ObjectManager - Overview
          • Part 1
          • Part 2
          • Part 3
        • ReportManager
          • ID values for analysis and analysis-result
        • ProjectManager - Overview
          • Part 1
          • Part 2
          • Attribute Information
        • SqlQuery
        • SystemManager
        • TaskManager
        • WanGridManager - Overview
          • Part 1
          • Part 2
      • Sample - transferring checkout files via FileManager
      • Sample - VBS
    • Text Preprocessing API
      • Introduction
      • How to browse the API
      • Sentence splitting
      • Abbreviations

Sample code - Integrated solution

This sample code is written for developers who want to integrate their solutions into the crossConnect for External Editing pipeline, but at the same time want to avoid manual parsing of XLIFF files.

The sample project demonstrates how to perform external quality management (QM) checks of the source XLIFF file extracted from an External Editing Work Unit (EWU) container, enrich it with the analysis results, and finally put together an External Editing Response Unit (ERU).

Sample's simplifications

The project's executable operates on the SampleContainer.ewu file. Its extension suggests that it is an encrypted container, but in reality it's just a plain XLIFF file.

The reason for that is the fact that the sample project has no vendor-specific assembly for EWU/ERU decryption/encryption. However, the code has commented out sections marked with TODO 3 and TODO 4 tokens, which demonstrate how a vendor-specific assembly could be integrated into the process.

How to run the sample code

  1. To run the sample code, do the following:
  2. Open CrossConnectConnectorSample.sln in Visual Studio (min. version 2012).
  3. Build the project.
  4. Go to bin/Debug or bin/Release depending on your current build configuration.
  5. Run the CrossConnectConnectorSample.exe without any arguments.
  6. The SampleContainer.eru file appears in the folder. The analysis results were injected into it. You may use a text editor to see how its contents differ from the SampleContainer.ewu file.

Project structure

  • Program.cs contains the main program flow:
  • Decrypting the EWU.
  • Parsing the source XLIFF and iterating over its paragraphs.
  • Sending each paragraph's contents to an external analyzer.
  • Converting analysis results to the Across XML structure.
  • Integrating the analysis results XML into the source XLIFF to produce the target XLIFF.
  • Encrypting the target XLIFF into ERU.
  • Lib\XLIFF.Parser\DSE.XLIFF.Parser.dll and Lib\XLIFF.Parser\Across.Common.DSE.dll are assemblies which could be used to parse and modify the XLIFF files.
  • ExternalAnalyzer\RegexChecker.cs represents an external XML analyzer and contains a few sample checks.
  • ExternalAnalyzer\AnalysisResult.cs contains the object structure the RegexChecker produces as a result.
  • AcrossNamespace.cs contains the XML namespace and prefix declarations to be used in the analysis result XML.
  • ResultConverter.cs converts instances of the AnalysisResult class to XML.

Preparing for production

To transform the sample code to the production code several modifications have to be performed. The places to be changed are marked with numbered TODO tokens (there are four of them). The most important thing is integration of a real vendor-specific library (to be provided by Across) in place of the current stub code.

Sample file
CrossConnectConnectorSample
Register for our Newsletter now

Our newsletter provides you with exclusive news about the Across Language Server, often even before the official announcement. The newsletter also provides you with early information on events, webinars, and training sessions.

  • Legal Notice
  • GTC
  • Privacy Statement
  • Cookies
  • info@across.net