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

Re: XML-formatted data can be incrementally enriched withmore

  • From: Dimitre Novatchev <dnovatchev@gmail.com>
  • To: "Costello, Roger L." <costello@mitre.org>, "xml-dev@l..." <xml-dev@l...>
  • Date: Sat, 28 Oct 2017 13:38:34 -0700

Re:  XML-formatted data can be incrementally enriched withmore
 Hi Roger,

> Lesson Learned: XML is the only data format that supports incremental enrichment.

At first I thought that what you describe is related to strong vs.
weak vs. no typing, late binding and so on

It is related to some extent, however extensibility can be achieved in
a standard way even with strongly typed languages.


Here is an example:

1. Serialization of an object that *we know* implements:

     public interface Interface1;

2. An interface that extends Interface1:

     public Interface2 extends Interface1;

Now, the serialization of any object that implements Interface2 is
readily handled by clients that expect the type to be Interface1
*and*  by clients that expect the type to be Interface2


One can define a chain of types of unlimited length:

     InterfaceN --> InterfaceN-1 --> ... --> Interface2 --> Interface1

where --> means "extends"

And in the most general case this doesn't need to be a linear chain --
it would be a type hierarchy.

Any client that expects the serialization of a particular type
(InterfaceK) would get their object when passed the serialization of
the top type in the hierarchy.

The opposite case -- when a client doesn't know what is the type of
the object that is serialized  -- results in error / is useless --
even when the serialization is XML.

So, when you extend the XML, the most outermost top in the hierarchy)
object-type cannot be used unless you provide the its type definition,
and thus the type definitions of all types in the hierarchy an (and
their meaning) to eventual clients.

It is like throwing new types of objects into a hash-table -- when
retrieved they would be usable only if the clients have the necessary
additional (not contained in the hash-table itself) type information.




Cheers,
Dimitre

On Fri, Oct 27, 2017 at 5:18 AM, Costello, Roger L. <costello@mitre.org> wrote:
> Hi Folks,
>
>
>
> Assertion: The XML data format is the only data format that lends itself to
> incremental enrichment.
>
>
>
> Assertion: If data is to traverse through a workflow and you want the data
> to be incrementally enriched along the way, then you must format the data as
> XML.
>
>
>
> Do you agree with those assertions?
>
>
>
> Below is a scenario that shows what I mean by incrementally enriching data.
>
>
>
> Scenario: Node 1 receives this XML document about an aircraft flight:
>
>
>
> <aircraft>
>     <flight>United Airlines 545</flight>
> </aircraft>
>
>
>
> Node 1 enriches the document with data about the departure airport:
>
>
>
> <aircraft>
>     <flight>United Airlines 545</flight>
>     <departure-airport>Boston, Logan</departure-airport>
> </aircraft>
>
>
>
> Node 1 receives a second XML document about a second aircraft flight. Again,
> Node 1 adds data about the departure airport. Node 1 then bundles the two
> XML documents, and sends the bundle to the next downstream node.
>
>
>
> <northeast-flights>
>     <aircraft>
>         <flight>United Airlines 545</flight>
>         <departure-airport>Boston Logan</departure-airport>
>     </aircraft>
>     <aircraft>
>         <flight>Southwest Airlines A37</flight>
>         <departure-airport>Washington Dulles</departure-airport>
>     </aircraft>
> </northeast-flights>
>
>
>
> What this scenario shows is that, if the data is formatted as XML, it is
> quite reasonable to incrementally add more and more information to the data.
>
>
>
> Suppose the data is not formatted as XML. Can the data be incrementally
> enriched with more and more information?
>
>
>
> Suppose the data is formatted as Comma Separated Values (CSV). Does the CSV
> format lend itself to incremental enrichment? How would you bundle together
> multiple CSV files and provide data about the bundle?
>
>
>
> Suppose the data is binary. For example, suppose the data is a JPEG file.
> How would you incrementally enrich JPEG files? How would you bundle together
> multiple JPEG files and provide data about the bundle?
>
>
>
> Lesson Learned: XML is the only data format that supports incremental
> enrichment.
>
>
>
> /Roger
>
>
>
> P.S. I reckon JSON-formatted data can also be incrementally enriched.
>
>
>
>



-- 
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
To avoid situations in which you might make mistakes may be the
biggest mistake of all
------------------------------------
Quality means doing it right when no one is looking.
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play
-------------------------------------
To achieve the impossible dream, try going to sleep.
-------------------------------------
Facts do not cease to exist because they are ignored.
-------------------------------------
Typing monkeys will write all Shakespeare's works in 200yrs.Will they
write all patents, too? :)
-------------------------------------
Sanity is madness put to good use.
-------------------------------------
I finally figured out the only reason to be alive is to enjoy it.


[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.