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

Re: Is XML a language or a data format?

  • From: Michael Kay <mike@saxonica.com>
  • To: Roger L Costello <costello@mitre.org>
  • Date: Thu, 14 Jul 2022 11:27:42 +0100

Re:  Is XML a language or a data format?
Every data format has a grammar. It might be expressed in narrative prose or in a diagram or through examples, rather than in BNF, but it has a grammar and without knowing the grammar, it's useless.

The JPEG spec says:

A JPEG image is represented as a sequence of segments where each segment begins with a marker. Each marker starts with 0xFF byte followed by marker flag to represent the type of marker. The payload followed by marker is different as per marker type. Common JPEG marker types are as listed below:

What's that, if not a grammar?

If there's a difference between the terms "data format" and "language", I think the distinction is to do with the expressive power. 

A traffic light can only send out a small finite set of messages ("Stop", "Go", "Get Ready") and we wouldn't normally call such a small set of utterances a language, because it doesn't have sufficient expressive power; but in any rigorous definition of what a language is, it's very likely to qualify. There is certainly a grammar:

SIGNAL := RED | GREEN | AMBER | RED+AMBER

Michael Kay
Saxonica

On 14 Jul 2022, at 10:53, Roger L Costello <costello@mitre.org> wrote:

Hi Folks,
 
Yesterday a colleague made a fascinating distinction between “language” and “data format”:
 
  • First he noted that English is a language, not a data format. Likewise, Java is a language, not a data format.
  • A language is specified by a grammar. There is a grammar for English and a grammar for Java. A language is intended to read by humans.
  • A data format probably does not have a grammar. It oftentimes is simply a collection of pieces and parts. It is intended to be processed by a machine. An example of a data format is JPEG (Exif). There is no grammar for it. It is just a series of parts pieced together as the graphic below illustrates.
Do you agree with that distinction? How do you define language? How do you define data format? How do they differ?
 
Is XML a language or a data format?
 
There is an XML grammar. XML is intended to be read by humans. Therefore, XML is a language. Right?
 
On the other hand, XML is a format for structuring data. XML is intended to be processed by machines. Therefore, XML is a data format. Right?
 
Which is it, a language or a data format?
 
/Roger
 
<image002.png>



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.