Converting FLExText Files to XLingPaper Interlinear Texts

Let’s assume that we have a generous friend who has gifted us an interlinearized text from FLEx with morpheme level glossing in the format of .flextext. (.flextext is an XML formated file.) And lets say we want to type set that file in XLingPaper. How can we do that?

One might be tempted to import the .flextext file into FLEx so that it can be re-exported with the XLingPaper exports from the FLEx menus, but this is not really a viable option becasue if we import that FLExText to an empty FLEx database, FLEx will not import the morpheme level annotations — it will recognize the free-translation and the baseline text. Bascially anything which is related to the lexicon part of the database is not viewable in the imported database.

However all is not lost we can use the XSLT transforms from FLEx by copying them to a usable location as the data start of those transforms is also .flextext.

I run linux. On the command line I used locate to find the XSL file titled xml2XLingPapConcatMorphemes.xsl with $ locate xml2XLingPapConcat

It appeared on my comptuer at /usr/share/fieldworks/Language Explorer/Export Templates/Interlinear/xml2XLingPapConcatMorphemes.xsl

To run these transforms I was advised to use Saxon. Saxon is already installed on linux if XLingPaper is installed. Saxon comes with XMLMind.

I also used locate to find the Saxon file with $ locate saxon Mine was located at: /opt/xxe-perso-7_6_0/bin/saxon.jar

The basic syntax for operating Saxon is as follows: java -cp "wherever_saxon.jar_is/saxon.jar" com.icl.saxon.StyleSheet the_flextext_file path_to_the XSLT_files/\xml2XLingPapConcatMorphemes.xsl > the_XLingPaper_output_file.xml

I then needed to change where I told Saxon the files were located. In my case I coppied the .xsl files to their own folder within my project folder for simpler operation.

There are other .xsl files for transforming FLExTexts to interlinear files in XLingPaper. These can be seen by using locate or in the official repo: Check for the other files in the official FLEx repo at:, or specifically look at XLingPaper export xsl transforms as discussed in their origional merge into the FLEx project:

Hugh Paterson III
Hugh Paterson III
Collaborative Scholar

I specialize in bespoke research at the intersection of Linguistics, Law, Languages, and Technology; specifically utility and life-cycle management for information products in these spaces.