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-formatted data can be incrementally enriched withmore and more information ... can data in other data formats be enriched? ...can binary formatted data be enriched?

 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]


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