[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] The semantics of an XML document is =?utf-8?q?=E2=80=A6?=
- From: Norman Gray <norman.gray@glasgow.ac.uk>
- To: Tim Bray <tbray@textuality.com>
- Date: Mon, 10 Jan 2022 16:00:18 +0000
Greetings.
In a computing context, I've always taken 'semantics' to refer to everything 'above' the level of 'syntax', in a cheerfully hand-waving way.
Thus
2 + 2
is a legal string of arithmetic tokens, in the syntax we learned in primary school, and
2 2 +
isn't. Choosing to interpret one or both of these token-streams as an arithmetic expression is a semantic act. If we've heard of reverse-polish notation, then we may additionally recognise the second stream as a legal stream in that syntax, in which case we will ascribe to the second stream the same semantics -- the same meaning/implication/truth-value/blah -- as the first.
In a general-purpose computing context, that's about as far as I think we can go, without further qualifying the word 'semantics'. We could of course make many finer distinctions: is the sequence (double-quote, character, ..., double-quote) a 'string' or is it, in context, someone's name? Either, depending on what questions you're asking at the time, and either question, or either answer, would come under the broad umbrella of 'semantic'. There are entire academic disciplines attached to one or other shade of meaning of 'semantic'.
Thus Tim wrote:
> 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?
To which my answers would be respectively 'it depends', 'it depends (and I don't think 'semantic-ness' is a word)', and 'us'. And Tim's answers, though I don't disagree with them, are not vague enough for my taste.
Thus the 'semantic web' (which I think is/was a Good Thing) made a tactical mistake in calling itself the 'semantic' web, because it made it sound exotic and complicated, when all it was doing was trying to do _something_ on the web that wasn't just damn syntax. What do you have to do to share at least a little bit of meaning in a web-style way, _without_ the precoordination implied by previously having shared a schema+documentation?
To return to the start of the thread: the answer to Roger's initial question 'The semantics of an XML document is …?' is: 'it's all and any of the stuff you do with the document _after_ the parser has said "legal!"'.
Best wishes,
Norman
--
Norman Gray : https://nxg.me.uk
SUPA School of Physics and Astronomy, University of Glasgow, UK
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]