- General Information
- Connecting Third-party Systems
- crossConnect for content systems
- crossConnect for External Editing
- Purpose and usage
- 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
- Sample code - Integrated solution
- Across XLIFF format
- Generic File Connector
- Display Texts
- APIs
- APIs - Technology
- crossTank API v1
- crossTank API v2
- crossTerm API v1
- crossTerm API v2
- crossAPI SI
- Requirements
- Function Return Types
- crossAPI SI and Java
- List of Objects in crossAPI SI
- Sample - transferring checkout files via FileManager
- Sample - VBS
- Text Preprocessing API
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
- To run the sample code, do the following:
- Open CrossConnectConnectorSample.sln in Visual Studio (min. version 2012).
- Build the project.
- Go to bin/Debug or bin/Release depending on your current build configuration.
- Run the CrossConnectConnectorSample.exe without any arguments.
- 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.