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] Serialization of XDM

I've noted this lack before, especially wrt sequence serialization, and am inclined to agree with David here - it's probably worth putting together some form of serialization mechanism propsal for XDM, especially given the burgeoning use of XDM in XQuery and (to a certain extent) even in XSLT.

Kurt Cagle
Managing Editor

On Sun, Sep 13, 2009 at 11:06 AM, David A. Lee <dlee@calldei.com> wrote:
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
dlee@calldei.com  http://www.calldei.com


XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php

[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