[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Why do you share XML?

  • From: Daniela Florescu <dflorescu@mac.com>
  • To: "Costello, Roger L." <costello@mitre.org>
  • Date: Fri, 02 Oct 2015 11:56:01 +0200

Re:  Why do you share XML?
Roger, 

You don't share data (of any kind)  with a 'machine'.

You share it with an application. 

Best regards
Dana

Sent from my iPhone

On Oct 1, 2015, at 9:21 PM, Costello, Roger L. <costello@mitre.org> wrote:

Hi Folks,

Why do you create XML instances and then share—communicate—the instances with others? I have been thinking about this and it seems to me there are two reasons, which I describe below. I am interested in hearing your thoughts on this. Perhaps there are other reasons for why we share XML? Perhaps the description below is unclear and needs sharpening? Having a crystal-clear vision of why we share XML … well, that seems supremely important.

Note: this discussion is focused exclusively on machine-to-machine sharing of XML instances:

<image007.png>

It seems to me the fundamental reason we share XML is to either (a) direct or (b) enable behaviors.

1. Sharing XML as a Means of Directing the Behavior of Machines

When you share XML it because you want to dictate how other machines behave. You and the machines have agreed a priori as to what the XML and its data means and what behavior the machines should exhibit upon receiving the XML. In a sense the XML is pushing buttons in the machines, causing them to behave in certain ways:

<image008.png>

Example #1: The Internet Protocol (IP) header is an example of this. Each field in the IP header elicits a specific behavior in routers and gateways. The routers and gateways have agreed a priori to behave in the desired manner.

Example #2: The XSLT vocabulary is another example of this. The XSLT specification describes the behavior of machines (XSLT processors). Upon encountering, say, an xsl:for-each element the XSLT processor must iterate through each sequence item.

Douglas Comer defines "protocol" this way: Protocol specifications define the syntactic and semantic rules for communication. They give the details of message formats, describe how a computer responds when a message arrives, and specify how a computer handles errors or other abnormal conditions. Hey, this sounds exactly like what I've been describing. XML is a protocol specification.

2. Sharing XML as a way of Enabling Various Behaviors

Perhaps you are laissez faire about how machines should behave. You specify the meaning of the markup and of the data and leave it up to each machine that receives the XML to decide how to behave. Although each machine gets to choose how it behaves (i.e., what it does with the markup and the data), it is not free to interpret the XML in its own way. The XML creator has defined what the markup and the data means, the machines must conform to that definition. So in this case the sharing of XML triggers a behavior but does not dictate the exact behavior.

XML is a collection of data that a community has determined to be sufficient and useful:

<image009.png>

Example: An XML instance has an element, altitude, whose value is an integer. The data within the element must be interpreted as the number of feet above the ground. All machines that receive the XML must interpret the <altitude> element in this way.

Comparison

It seems to me that the second usage of XML (using XML to elicit various, unspecified behaviors) is harder, for these reasons:

(1) How do you know that the "collection of data" in the XML is complete, that there is sufficient information for machines to do something useful with it?

(2) Compliance testing is really hard. How can you be sure that all machines will interpret the data according to the semantics that you (the creator of the XML) specified? For instance, how can you be sure that every machine will interpret the data within <altitude> as the height in feet above ground, and not the height in meters above ground, or perhaps the height in feet above mean sea level (MSL)?

Comments?

/Roger



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.