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?
Not really, in that not all character sequences are XML, to be XML it has to match the grammar in the xml spec.
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?
well some applications construct a parse tree although there is no requirement that xml parsers do that, they may be event based or just report success or failure and not return the document at all.
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?
Only agreed as it doesn't really say anything, you could say the same about the characters in this email which have to be interpreted as English.
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?
It may do a computation it may not, Perhaps it's just logging flight data and the xml file is the final product kept for storage.
Conclusion: The meaning assigned to the XML document by the application is the result of the application's computation.
No.
TaDa! You must agree with my conclusion if you agreed with the preceding statements.
But if we don't agree with the premises or the deductive step then we don't have to agree with the conclusion.
For example, an application performs this computation:
duration * speed
resulting in 500.
The semantics assigned to the XML document by the application is:
500
No, that is simply an incorrect use of the word semantics.
You mean to say that 500 is the result of a computation but that certainly is not the semantics of a document that does not even encode that computation.
To my way of thinking, what I have laid out is a logical argument. Where is my argument flawed?
as above:-)
/Roger
David