This package provides a library that implements the XLIFF 2.0 OASIS Standard.
This library is under LGPL license and the source code for this package is hosted in the Okapi XLIFF Toolkit project.This distribution includes:
okapi-lib-xliff2-<version>.jar - Java library that
includes an XLIFF reader class, an XLIFF writer class, and various
helper classes to manipulate XLIFF data.lynx.jar - A tool to test and perform various
manipulation of XLIFF documents.lynx.bat - A batch file to run Lynx (for Windows).lynxPrompt.bat - An helper batch file used by
startLynxPrompt (for Windows).startLynxPrompt.bat - A Windows batch file to start a DOS
prompt where you can call Lynx from any folder.lynx.sh - A Bash shell script to run Lynx (on Linux and
Macintosh).Lynx is a command-line tools that can performs validation and a few other
tasks on XLIFF 2 documents.
It also implements short examples of code that illustrate specific aspects
of the library and demonstrate conformance (See conformance-notes.html
for details).
Note that you can also perform validation on-line here: http://okapi-lynx.appspot.com/validation.
In Windows, to start a DOS prompt from where you can call Lynx, just
double-click on startLynxPrompt.bat
-v validates the XLIFF document against the
XLIFF 2 schemas and performs the processing validation.-r reads the XLIFF document and display the
parsed components.-rw reads the XLIFF document and re-write
it.-rd removes the original data of the inline
codes.-ra removes the inline annotation markers (<mrk>/<sm>/<em>).-rx removes the extension elements and
attributes (not touching the skeleton content).-rm <nsSuffix> removes all elements
and attributes for the module ending with <nsSuffix>.
Use -rm all to remove all modules.-pseudo creates basic pseudo-translations
from the source (existing translations are overwritten). The
transformation is done as follow: digits are replaced by 'N', Ctrl+A
by 'A', the letters 'A' and 'a' by a Ctrl+A, other letters by 'Z'.-join1 removes all segmentation breaks in
each unit (except the segments with canResegment='no'
(Modifier mode)).-join2 removes all segmentation breaks in
each unit (even the segments with canResegment='no'
(Merger mode)).-seg applies basic re-segmentation to each
existing segment (breaks after the sequence period + whitespace). To
re-segment a unit already segmented use -join1 and -seg
at the same time.-fr finds a reference in the input file.-prefixes path allows the user to provide
the path of a properties file with additional prefixes for URI
fragment identification.-vr verifies the syntax of the ref
attributes in the annotations of in the input file.-prefixes path allows the user to provide
the path of a properties file with additional prefixes for URI
fragment identification.-lp lists all extensions/modules prefixes
allowed in fragment identifiers.-prefixes path allows the user to provide
the path of a properties file with additional prefixes for URI
fragment identification. -pvr processes the validation rules of any <validation>
element found in the document.-prefixes path allows the user to provide
the path of a properties file with additional prefixes for URI
fragment identification. -html reads the XLIFF document and creates
an HTML simple output from it.-x lists all examples available.-x<N> (where <N>
is a number) outputs the example of the snippet with that number. Use -source
to show the corresponding source code.-trace enable the display of the exception
stack when an error occurs.For example (assuming Windows command-line and the distribution directory):
lynx samples/example.html.xlf
lynx -rw -seg -pseudo samples/example.html.xlf
lynx -x6 -source
lynx -rw -rx -rm "fs:2.0" myFile.xlf
hello.html.xlf
document, type:lynx -r samples/hello.html.xlf
"#f=f1/u=tu1"
(i.e. the unit with id=tu1 in the file id=f1), type:lynx -fr #f=f1/u=tu1 samples/hello.html.xlf
lynx -?
To install the library:
To uninstall the library:
The documentation of the library is available in the documentation sub-directory.
See also the online Getting Started guide.
If you have questions, suggestions or bug to report, you can do this different ways:
Important notes on what validation the library performs:
<revision>
elements are only validated against the schema, not for processing
requirements or constraints not enforced in the schema). This is because
as far as the library is concerned they are part of the extension
elements.The list of prefixes allowed in fragment identifiers is stored in the
prefixes.properties file in the JAR file of the library.
See the Fragment Identifier Registration page for details and the list of all registered prefixes.
The option -prefixes path allows the user to provide the
path of a properties file with additional prefixes for URI fragment
identification. Those custom prefixes are added to the default ones. Note
that you can have more than one namespace associated to a single prefix.
The format of the custom prefixes file is the same as the default one:
<namespace-uri>=<prefix>'#' or '!'
as the first non-white space character.':',
'=', or '\' in the URI. See the Java
documentation for the full list.To modify the default prefixes.properties file in the
library JAR file:
As of this release of the toolkit, an effort to map and create a module for the Internationalization Tag Set 2.0 is in progress.
The following data categories are supported through a specialized API:
See the documentation for IWithITSAttributes and IWithITSGroups for details.
Other data categories can be access using the extension API.