Re: [xml-dev] RE: The semantics of an XML document is …

From
John Cowan <>
To
Tim Bray <>
Date
2022-01-10T15:27:10Z
ID
<CABzTEQCYzE+mUSCwy=>
Thread
Re: [xml-dev] RE: The semantics of an XML document is …
Still a great and highly relevant article.  JSON now occupies ASN.1's niche for new development, I think.  But when you need more data types than JSON provides and a binary representation with a textual equivalent, then schemaless ASN.1 BER is actually not bad, especially for use in dynamic languages: see <https://github.com/s-expressions/twinjo/blob/master/spec/Twinjo.md>.

On Sat, Jan 8, 2022 at 1:02 PM Tim Bray <[email protected]> wrote:
Eighteen years ago, I wrote “On Semantics and Markup”: https://www.tbray.org/ongoing/When/200x/2003/04/09/SemanticMarkup

I think I still mostly believe everything in that essay. It addresses three questions:
  •  When is markup semantic?
  • Is semantic-ness a binary condition?
  • Where do semantics come from?
and ends with this summary: 
  • Descriptive markup is better than the alternatives.

  • Descriptive markup is not necessarily semantic.

  • The phrase “semantic markup” constitutes a claim that needs to be demonstrated before being accepted.

  • Semantics don't come from schemas.


On Sat, Jan 8, 2022 at 9:03 AM Jean Kaplansky <[email protected]> wrote:
No. I don’t agree. 

Behavior is not part of the dictionary definition of semantics: 

(OED is behind a paywall)

On Sat, Jan 8, 2022 at 8:18 AM Roger L Costello <[email protected]> wrote:

Hi Folks,

In my previous post I wrote this: When there are no actions associated with the XML document:

  • What is its semantics?
  • Answer: it has no semantics because it has no actions.

It just occurred to me that it might be more correct to say that its semantics is “undefined.”

Do you agree?

If you agree, then is the “undefined semantics” concept analogous to the “undefined behavior” one reads about in programming language specifications?

/Roger

From: Roger L Costello <[email protected]>
Sent: Saturday, January 8, 2022 8:04 AM
To: [email protected]
Subject: The semantics of an XML document is …

 

Hi Folks,

The semantics of an XML document is determined by the actions taken on the XML document.

Consider this XML document:

<airplane-flight>
    <duration units="hours">1</duration>
    <speed units="kilometers-per-hour">500</speed>
</airplane-flight>

What is its semantics?

Answer: it has no semantics because it has no actions.

Pair up the XML document with actions that compute duration * speed (i.e., distance traveled by the airplane flight):

The semantics of the XML document is: 500

Pair up the XML document with different actions and it has different semantics:

Now the semantics of the XML document is: 310.686

----------------------------------------------

Wicked cool!

Comments?

/Roger

--
Jean Kaplansky
Content Technology Platform Analyst
[email protected]
Kaplan North America