[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
=?UTF-8?Q?Re=3A_=5Bxml=2Ddev=5D_RE=3A_The_semantics_of_an_XML_document_i?==?UTF-8?Q?s_=E2=80=A6?=
- From: Stephen D Green <stephengreenubl@gmail.com>
- To: Roger L Costello <costello@mitre.org>
- Date: Sun, 9 Jan 2022 14:56:57 +0000
What is the semantic difference between that XML and the sentence:
A flight took 1 hour at a speed of 500 kph.
?
No semantic difference. Syntax difference only.
Hi Folks,
I have often heard (on this list) that:
"XML is just syntax"
Do you agree that XML is just syntax?
If so, then this XML document:
<airplane-flight>
<duration units="hours">1</duration>
<speed units="kilometers-per-hour">500</speed>
</airplane-flight>
has no meaning (semantics). It is just a linear sequence of characters.
Do you agree with that?
Some applications (i.e., XML parsers) interpret certain characters (< > = ") as having significance (meaning) and from that interpretation they construct a parse tree.
Do you agree with that?
The identifiers (airplane-flight, duration, units, speed) in the parse tree have no meaning. Applications may be coded to interpret the identifiers to mean something.
So far, so good?
Of course, an application doesn't just I interpret the identifiers as having a meaning, it does something with the identifiers. It does a computation on them.
Agree?
Conclusion: The meaning assigned to the XML document by the application is the result of the application's computation.
TaDa! You must agree with my conclusion if you agreed with the preceding statements.
For example, an application performs this computation:
duration * speed
resulting in 500.
The semantics assigned to the XML document by the application is:
500
To my way of thinking, what I have laid out is a logical argument. Where is my argument flawed?
/Roger
--
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]