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

David A. Lee wrote:
> Even given that,  I agree with Micheal.   In the XML community, 
> working with XML types, XML tools it a JSON serializing format wont 
> have any significant acceptance.
I guess I don't understand the problem clearly.

If the problem is that the XQuery and XSD boosters, having made non-XML 
infosets and now needing to transfer their data between machines, have 
discovered they are without a paddle, I can see that.  That was the 
point James Clark made about the PSVI in 1999.

If the point is that people with their nice shiny XQuery systems cannot 
get their systems implemented without moving the data from the XQuery 
system to some middleware, or that they need to be able to access the 
type info in order to reap the benefits they thought they were getting 
by having a more type-aware backend system, I guess I could see that 
too. Progress is allowed to happen in stages.

But in most cases, the closer you get to the terminal/publication format 
the more that the "XML types" are likely to be web programmers who are 
completely comfortable with JavaScript and JSON.  It is only the XML 
types who work exclusively between backends and middleware who are are 
not keen on making good use of JSON, as far as I can see, with 
exceptions naturally.

If the problem is the more general one that we want to get data out from 
an XQuery or XSLT2 system, and then load it conveniently into some 
subsequent system, which may be XDM/PSVI, JSON seems fine to me.

IIRC there are ways to represent mixed content in JSON just using 
arrays: for example why not:

<p  class="story"  links="s1 s2 s3 s4" >It was a <b>dark</b> and stormy 

  // element
//  slot for namespace defns
               {"class": "story",  "links": [ "s1, "s2", s3", "s4"]  
},                //  attributes object
// slot for properties (XSD outcomes, types etc)
               [ "It was a ", [ "b",null,null,null,"dark"], "and stormy 
night"] ]    //  contents array

With such a convention, the typed XML is available to all sorts of 
scripting systems.

That conventions are needed, when the XDM-in-XML also needs conventions, 
is a pretty weak sort of argument against it, don't you think?  The 
difference is that the JSON is directly acceptable, while the XDM-in-XML 
needs extra APIs etc to make use of the typed/sequenced data.

Rick Jelliffe

[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