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-dev=5D_The_meaning_of_=E2=80=9Csemantics?==?utf-8?Q?=E2=80=9D_and_=E2=80=9Csyntax=E2=80=9D_in_XPath?=

In the world of programming languages, semantics is about the result of executing a program, for example it is concerned with the fact that the result of the XPath expression "London" || "is in" || "England" is the string "London is in England".

This has almost nothing to do with the usage of the term semantics by philosophers, linguists, and "semantic webbers" who are concerned with how to interpret the statement "London is in England" as a proposition concerning the geographic location of the entities referred to as "London" and "England".

Neither usage is fuzzy, but they are very different.


Here is the XPath expression:

 

                /Book/Author

 

Here is an XPath expression with identical semantics, but different syntax:

 

                /Book/*[self::Author]

 

Why does the XPath language allow expressions with different syntax and identical semantics?

 


For usability. There is no need to provide a "+" operator, because the semantics are the same as "--" (2+2 always gives the same result as 2 - - 2). But a "+" operator is very convenient, so the fact that it's redundant really doesn't matter. Minimalism is a reasonable aim, but not if you take it to extremes.

Michael Kay
Saxonica




[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