Re: [xsl] library for parsing RTF

Subject: Re: [xsl] library for parsing RTF
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Sun, 27 Jun 2010 22:12:31 +0100
there is no library and it is not required:
since RTF is a textual format, you can use XSLT 2.0 regexp capabilities to parse RTF

For a language as rich as RTF, regular expressions are not going to get you all that far: they are probably only suitable for writing the lexical analyzer (or tokenizer).

Dimitre Novatchev seems to be the expert on writing parsers in XSLT. Perhaps his next project could be a parser-generator (aka compiler-compiler) - a program that takes a BNF description of the grammar you want to parse, and generates an XSLT stylesheet/library to do the parsing.

Michael Kay

Current Thread