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]
Re: [xml-dev] "XML is just syntax" versus "Use semantic markup" (Is this a paradox?)

Syntax is the implementation of the semantics.

If I have want to convey that a person's first name is Roger and their
second is Costello I can make a syntax that says

<a><xitem xitempoint="b{123}"/>
<b item="123">Roger</b>
<b item="123">Costello</b>
 </a>

and specify that xitem means person and that b is a name , the first
occurrence of a b element with an item attribute that matches the
value between the curly brackets of xitempoint attribute on my xitem
is the first name of the person, the second that matches is the second
name and so forth.

Of course that would be outrageously stupid, therefore I make a syntax
that matches closely my semantics and the semantics of a large number
of the english speaking world:

<person><name><firstname>Roger</firstname><lastname>Costello</lastname></name></person>

so that when a person with very little syntactical knowledge of my
format but with the common semantic knowledge of how names are
structured in the West can figure out how to represent a person's name
syntactically. In fact they might even guess, wow I bet the middle
name is optional and called <middlename>, of course it's wrong to
guess what the syntax for conveying semantics is and rely on that
guess but it is fine to make that guess and then confirm it, because
it makes the learning of a new format somewhat smoother.

So personally I have the principle, and I guess it is a commonly held
one, that it is appropriate for syntax to mirror as closely as
possible the semantics for what one is trying to represent.

Cheers,
Bryan Rasmussen


On Sun, Mar 9, 2008 at 1:49 PM, Costello, Roger L. <costello@mitre.org> wrote:
> Hi Folks,
>
>  I have often heard it said: "XML is just syntax."
>
>  I have equally often heard it said: "Use semantic markup."
>
>  How can XML be "just syntax" and also be "semantic markup"?
>
>  Is this a paradox?
>
>  Let me take a go at resolving this seeming paradox:
>
>  1. Tags are indeed just syntax.  They provide a mechanism for
>  structuring the data.
>
>  2. Tags are created by a specification, which define what each tag
>  means.  When constructing an XML document, there may be a choice of
>  tags, say <ABC> and <XYZ>, which may be used to wrap a particular datum
>  (item of data).  Suppose the specification gave tag <ABC> a general
>  meaning and tag <XYZ> a specific meaning. Compare:
>
>     <ABC>datum</ABC>
>
>  versus
>
>     <XYZ>datum</XYZ>
>
>  We say that the later is using "semantic markup."  This means: those
>  applications which have been implemented to understand the tag-set will
>  gain more information about 'datum' from the <XYZ> tag than from the
>  <ABC> tag.
>
>  Let me repeat the last sentence:
>
>  "... will gain more information about 'datum' from the <XYZ> tag than
>  the <ABC> tag."
>
>  Hmm, sounds to me like the tags are providing more than just syntax.
>  The tags are providing information/meaning/semantics about 'datum'.
>
>  This paradox is unresolved in my mind.
>
>  Care to take a go at resolving this paradox?
>
>  /Roger
>
>  _______________________________________________________________________
>
>  XML-DEV is a publicly archived, unmoderated list hosted by OASIS
>  to support XML implementation and development. To minimize
>  spam in the archives, you must subscribe before posting.
>
>  [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
>  Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
>  subscribe: xml-dev-subscribe@lists.xml.org
>  List archive: http://lists.xml.org/archives/xml-dev/
>  List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>
>


[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