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]
=?UTF-8?Q?Re=3A_=5Bxml=2Ddev=5D_The_semantics_of_an_XML_document_is_?==?UTF-8?Q?=E2=80=A6?=

Here is an interesting example. The order of lines in an address has semantic meaning where the last line might be the country and the previous line might be a zip code or postal code, and each line’s position has semantics in that usually a following line represents an encapsulation of the previous line such as a house being within a street which is within a city which is within a country. That could be seen as encapsulation or as the street possessing the house - the street has a house number 10, the city has a street named First Street. All these are kinds of semantics. With regard to actions taken based on the semantics, an address is usually written to aid delivery. A postal code, zip code is usually to aid with assurance of correct street, if two streets have the same name, plus aid to automated sorting of letters, plus aid to data entry by looking up addresses by the code. In regard to the XML representations of the address, the label might be simply ‘address line’ for each element in XML. Then there may be semantics, meaning, in the sequence of those lines. A zip code or postal code has different semantics to other kinds of address line but might only be represented as an address by its position in the sequence, perhaps having the tag label ‘address line’ too. Or it could be separated from other address details so that software can use it as a lookup key. 

On Sat, 8 Jan 2022 at 13:04, Roger L Costello <costello@mitre.org> wrote:

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

--
----
Stephen D Green


[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