[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: library for parsing RTF

Subject: Re: library for parsing RTF
From: Andriy Gerasika <andriy.gerasika@xxxxxxxxx>
Date: Wed, 30 Jun 2010 22:57:52 +0300
Re:  library for parsing RTF
This seems about as useful as a regex C compiler, that compiles

main() { printf ("Hello world!\n"); }

and _nothing_ else.

C is procedural language, RTF is markup language. I am pointing that BNF is too heavy for markup languages, such as RTF, MIF, CSS, JSON -- parsing of that can be relatively easy performed w/ XSLT and regexps. At least I find it more difficult to deal w/ YACC compared to XSLT and regexps.


For example, I have created simple JSON to XML parser in XSLT using regular expressions:
http://www.gerixsoft.com/sites/gerixsoft.com/files/json2xml.zip


IMHO it is more simple compared to parser on top of BNF


Just because you can make an regex for _one instanace_ of a grammer does not mean that you can (easily) use regexs to parse a generic format. RTF is generic - there are MANY valid ways to say similiar things in RTF.

This is semantics, not syntax.


General RTF syntax of curly braces and control tags prefixed w/ "\" is always the same for all vendors. The fact that Apple uses its own RTF control tags and Microsoft is using its own RTF control tags, does not change the RTF {} and \ syntax.

RTF is very similar to HTML and CSS -- syntax is always the same for all vendors, elements and semantics behind elements may be different. But it is not a question of parser, and I doubt BNF parser will handle the semantics.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.