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'm not going to enter into a JSON war.  Your example only works if you 
know the meanings of "p" , "links" and "b".
Encoding *arbitrary XML* losslessly in JSON is not nearly so simple or 
clean.   There is *not* a single existing accepted convention on how to 
do it.
There's lots of articles claiming to have defined such a transformation 
but they are all different and solve various aspects of the problem 
while ignoring others.
But I'm not going to argue that.

As for use cases,  the use cases of interest to *me* is transporting XDM 
from XML processes and tools to other XML processes and tools,
not how to get XDM into Javascript.   Adding JSON to this mix adds more 
problems then it solves, IMHO.

I agree that use cases are *opinions*, they are not axiomatic.   I think 
I will take Michael's advise and start to document some use cases that I 
have in mind more formally and come back at a later date to this list 
with a strawman.

David A. Lee

Rick Jelliffe wrote:
> 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
> _______________________________________________________________________
> 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