Extracting the translation identifiers and translatable text

You can use the example extractstrings.xslt file as a starting point to extract the XLIFF identifiers and text that must be translated from the form design.

Pass the form design as the input to the extractstrings.xslt style sheet by using an XSLT processor, such as a free or commercial version of the Saxon XSLT processor. Optional and required arguments are available. The required arguments describe how to execute a given XSLT. The optional arguments contain metadata.

For example, to extract the XLIFF identifiers and text from the MyForm.xdp file, enter the following required arguments at the command prompt to generate the MyForm.s2x file:

java -jar saxon8.jar MyForm.xdp extractstrings.xslt > MyForm.s2x

MyForm.xdp is the name of the form design that you extract the XLIFF identifiers and text from, and MyForm.s2x is the file that you send to be translated.

Make sure that you keep a backup of the XLIFF file. Then, if you must edit the form design, you can easily determine which strings must be translated by comparing the XLIFF backup file with the XLIFF file for the changed form design.

Note: The saxon8.jar file can have a different name, depending on the version of Saxon being used. An example is saxon9.jar .

extractstrings.xslt optional parameters

You can specify the following optional parameters that are included in the S2X metadata.

Parameter

Description

locale

Locale of the form design

xdpFilename

Name of the form design that you extract the XLIFF identifiers and text from

develContact

Email address of the contact for the form design

collection

Name of the package

domain

Domain name

Each parameter has a default:

<xslt:param name="locale" select="'en'" /> 
<xslt:param name="xdpFilename" select="'mytemplate.xdp'" /> 
<xslt:param name="develContact" select="'developer@mycompany.com'" /> 
<xslt:param name="collection" select="'package'" /> 
<xslt:param name="domain" select="'BC'" />

Here is an example:

java -jar saxon8.jar input.xdp extractstrings.xslt xdpFilename=MyForm.xdp locale=en_CA > MyForm.s2x

// Ethnio survey code removed