|
Article Excerpt ConciseXML is a new syntax I co-developed with Christopher Fry that builds on the best features of XML and S-Expressions while eliminating their constraints.
XML originated with the document-markup world of SGML and has become the leading syntax of the Internet. Its use been for documents and data--not for programming logic.
S-Expressions, or symbolic expressions, is the syntax behind Lisp-like languages, including Scheme. Basically, S-Expressions are nested lists of symbols. S-Expressions are used with languages that support the notion that code is data.
The many discussion postings on the Web regarding these topics would indicate a disconnect between the S-Expression and XML camps. The purpose of this article is to bridge the two worlds and offer a solution that addresses everyone's needs.
To illustrate the differences among the three syntaxes, let's start with a data structure expressed in XML S-Expressions, ConciseXML, and also a commonly used semicolon-delimited syntax used by many programming languages, including Java. While there are multiple ways of encoding the data in XML and S-Expressions, only one is shown for the purposes of the first comparison.
* XML
* S-Expressions
(book "0764525360" "Water Language" 2002)
* ConciseXML
* Semicolon-Delimited Syntax
new Book ("0764525360", "Water Language", 2002);
There are a number of similarities among the first three syntaxes:
* The expressions are delimited by characters that indicate the start and end of the expression. S-Expressions are delimited by a set of parentheses "( )", while XML and ConciseXML expressions use angle brackets " ".
* The expression name occurs immediately after the initial delimiter.
* White space is used to separate arguments.
* The syntax is independent of a specific language.
The semicolon-delimited syntax is different from the others in several ways. A comma is used between arguments, and there is no set of delimiter characters that always begin or end an expression. Parsing a semicolon-delimited syntax requires that the parser have language-specific knowledge. The first three syntaxes can be easily parsed, independent of any language.
Now let's look at some of the differences among the four...
|
|

More articles from XML Journal
Remember ebXML? Doing business in real time.(Standards), February 01, 2004 Web-services transactions: from Loosely Coupled--the Missing Pieces of..., February 01, 2004 FileAct for SWIFTNet: helping financial services gain savings from the..., February 01, 2004 Rendering a connected tree using XSLT: the ideas behind XSLT and XPath..., February 01, 2004
Looking for additional articles?
Search our database of over 3 million articles.
Looking for more in-depth information on this industry?
Search our complete database of Industry & Market reports by text, subject, publication
name or publication date.
About Goliath
Whether you're looking for sales prospects, competitive information, company
analysis or best practices in managing your organization,
Goliath can help you meet your business needs.
Our extensive business information databases empower business
professionals with both the breadth and depth of credible,
authoritative information they need to support their business
goals. Whether it be strategic planning, sales prospecting,
company research or defining management best practices -
Goliath is your leading source for accurate information.
|
|