XSLT transformation file for XML preview rejected by memoQ with unsupported format error
Context: You are creating an XML filter configuration, and want ot have a nicely formatted HTML preview for it, in place of the "code preview" you normally get. You have an XSLT file or a folder with XSLT and related files, you set up the main XSLT file, and memoQ rejects the XSLT file.
Description: XSLT in general is a tool to transform an XML file to something else, with similar "useful" content but a different format. An XSLT file may transform XML to HTML, or another form of XML, etc. For XSLT preview, memoQ expects the output of the transformation to be HTML. Furthermore, it expects the XSLT file to explicitly state that it is transforming to HTML. In some cases, the XSLT file itself produces perfect HTML, but lacks this statement, and memoQ refuses it when creating the configuration by saying the XSLT transforms into an unsupprted format. The exact error message is this:
"The specified XSLT template transforms the XML files into an unsupported format. memoQ will ignore this XSLT file."
Fix: You can add a line to the XSLT file so that it states it transforms to HTML. One example of the first few lines of an XSLT file is below. Here, after adding the <xsl:output...> tag in the line after the <xsl:stylesheet...> tag, memoQ accepts the XSLT file.
<?xml version="1.0" encoding="utf-8"?>
<!-- Edited by XMLSpy® -->
<xsl:output method="html" />