|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] Serialization of XDMHans-Juergen Rennau hrennau at yahoo.deSun Sep 13 23:53:38 PDT 2009
David,
in my opinion it is a BIG problem if one feels (like I do) that you are heading for a GREAT idea: advancing from the concept of a byte stream to the concept of an info stream. (info stream = XDM-modelled character stream.) If one remembers what is gained by enabling the interconnection of units emitting/consuming byte streams, one may be surprised to discover that one cannot readily connect by info stream. (That is, unless accepting that all information must be document-wrapped, the XDM subset you spoke of.) Perhaps it is a question of how tightly the units must be coupled. If the work invested in exchange is small compared with internal work (example: consuming/providing web services) it is usually not too much asked to dress up and present oneself as an XML document. XProc accepted this point of view. However, if one aims at a more immediate coupling (shell ...), one arrives at this Big Problem. I think you are right, it *is* a gap, and it *should* be
addressed by a W3C recommendation. (Also, this would mean the emancipation of XDM from XML, which is overdue.)
One more thought. XQuery is a prince looking like a frog. If the XDM were not what it is and forced XQuery expressions to exchange documents, rather than item sequences, XQuery were a frog looking like a frog. This alone might already make us think...
With kind regards,
Hans-Juergen
----- Ursprüngliche Mail ----
From: "David A. Lee" <http://x-query.com/mailman/listinfo/talk>
Subject: Serialization of XDM
I'm dual-posting this because I think it is relevant to XML in general,
but perhaps more so to xquery
Summary (postulate)
There is no standard or even 'community accepted' way of serializing XDM
Why is this a problem
XML languages which produce XDM (such as XPath and XQuery) and can
accept XDM (such as XQuery and XPath through external variables) or
produce XML are not 'closed' wrt serialization. For example XQuery can
produce things which have no standardized representation. The only way
to consume and produce these "things" are with proprietary formats, and
even those only exist in 'in memory' language representations in general.
The classic example is an XDM Sequence. There is no standard or even
common serialization format for Sequences.
Thus an XQuery which produces a sequence (say a sequence of xs:integer)
cannot have its output fed back into another XQuery in any standard way.
It is true that some implementations of XQuery provide in-memory
formats for XDM such that the result of that vendor's XQuery can be used
as input to that vendor's XQuery in the space of that vendor's
implementation language. And Some frameworks (such as .NET) provide
in-memory interfaces for XDM. But in general once you cross vendors or
cross languages or exit the realm of languages there is no standardized
or common way to accomplish interop between XDM producers and consumers.
Why is this a BIG problem
I believe one of the reasons XML has achieved its great success to date
is due to its standardized Text serialization format. If XML resided
purely in the abstract space of "INFOSET" I don't believe it would have
proliferated to even 1,000,000th as much as it has today.
The fact that newer XML processing languages can produce datum which has
no text serialization format is a BIG problem, IMHO.
It means that there is no way to exchange data produced by one vendor's
implementation to another unless it conforms to the subset of XDM which
is the XML Document.
Even within *the same vendor* it is almost impossible. For a tougher
example, take an XQuery which produces an attribute. There is no XQuery
vendor that I know of that can serialize an attribute to a 'file' (or
network, or string buffer) and read it back even in its own implementation.
Take even something as simple as text. Serialize a single atomic text
value such as "1" and try to read it back. Even if a vendor supports
reading XDM from a file, (which I know of none), what type would it
assign to "1" ? xs:string ? xs:integer ?
I believe this lack of standardization for serialization of XDM is both
a "Problem" and a "BIG Problem"
Before I extend the topic to "suggested solutions" I would love some
feedback.
Q: Does anyone else agree this is a "Problem" or a "Big Problem" ? Am I
alone ? Why is this NOT a "Big Problem"?
Q: Is there any known work in progress aimed at solving this problem ?
Q: Would it be of value to solve this problem ? (and why not ?)
Q: Would there be any interest in tackling this problem in a formal way,
such as a W3C recommendation ?
Q: If there were a recommendation approved would vendors be interested
or willing to adopt / implement it ?
David A. Lee
------------------------------
_______________________________________________
http://x-query.com/mailman/listinfo/talk
http://x-query.com/mailman/listinfo/talk
End of talk Digest, Vol 77, Issue 19
************************************
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






