Scrivener MMD -> RTF Error

I’m consistently unable to output RTF from a MMD-styled file in Scrivener 2.0.2, in OS X 10.6.5 with MMD set up as instructed. I get the following:

runtime error: file XSLT/xhtml2rtf/xslt line 322 element param
Unexpected XSLT element ‘param’.
runtime error: file XSLT/xhtml2rtf/xslt line 323 element value-of
Variable ‘newLeft’ has not been declared.
xmlPathCompiledEval: evaluation failed
runtime error: file XSLT/xhtml2rtf.xslt line 323 element value-of
XPath evaluation returned no result.

The Mata-Data for the project uses:

XHTML XSLT: xhtml-toc-h2.xslt
RTF XSLT: xhtml2rtf

Any ideas?

I would try removing the RTF XSLT meta-data line and see if that works. It should work without any meta-data by default.

I just ran in to the same issue myself, yesterday.

The problem is that the xhtml2rtf.xslt file in Multimarkdown 2.0.b6 doesn’t validate, so it causes the processing to halt with the error message you’re getting. The version of this file included in the Scrivener package works, however.

This conversions – from Multimarkdown to RTF via XSLT – isn’t well supported; Fletcher’s comments in the xhtml2rtf.xslt file give you an idea of how bad it actually is. He actually suggests that you’re better off converting from MMD to XHTML, uploading that to Google Docs, and then using their translator to export as RTF.