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

Re: Serialization of XDM

  • From: Rick Jelliffe <rjelliffe@allette.com.au>
  • To: xml-dev@lists.xml.org
  • Date: Wed, 16 Sep 2009 00:57:30 +1000

Re:  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 
night</b>

 ["p",                                                                                            
  // element
               
null,                                                                                
//  slot for namespace defns
               {"class": "story",  "links": [ "s1, "s2", s3", "s4"]  
},                //  attributes object
               null 
,                                                                                
// 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.

Cheers
Rick Jelliffe
 






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