XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Purely informational XML documents is an illusion

Hi Folks,

A few weeks ago Michael Kay wrote:

 > A sentence can provide information, give instructions, or ask questions.

He gave an example of each type of sentence:

(a) There are tomatoes in the fridge.
(b) Go to the shop and buy more tomatoes.
(c) How many tomatoes are there in the fridge?

I assert that there is only one type of sentence. Every sentence is an instruction.

"There are tomatoes in the fridge" is an instruction to hold tight, don't go to the shop to purchase more tomatoes.

"How many tomatoes are there in the fridge?" is an instruction to go to the fridge, open it, and count the number of tomatoes.

This XML document is seemingly pure information:

<Book>
    <Title>Move your DNA</Title>
    <Author>Katy Bowman</Author>
    <Publisher>Propriometrics Press</Publisher>
</Book>

But that's not the case. It is an instruction to go to Amazon, look up the book, and see what the book is about. 

"Okay Roger, let's suppose that what you say is true and every sentence is an instruction. So what?"

Here's the so what:

- Instructions elicit behavior. 

- Instructions have semantics. 

- Semantics can be represented by an interpreter. 

Got two data formats and you want to know if they are equivalent? Comparing the data formats item by item is a Sisyphean task. Instead, write an interpreter for each data format, run instances of the data formats through the interpreters and compare their outputs. If their outputs are the same, the data formats are equivalent. If their outputs differ, the data formats are not equivalent.

Here's a summary of my argument:

1. All sentences are instructions.

2. An XML document is a sentence.

3. Instructions elicit behavior.

4. Instructions have semantics.

5. Semantics can be represented by an interpreter. This is called interpreter semantics.

6. To understand a sentence -- to understand its semantics -- run it through the interpreter.

Do you agree with my argument?

/Roger


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


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS