XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
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] Was OOXML's problem that it should have used JSON not XML?

There's another challenge with converting this kind of material to JSON

<w:p>
 <w:pPr>
   <w:pStyle w:val="Heading1"/>
 </w:pPr>
 <w:r><w:t>Favorites</w:t></w:r>
</w:p>

There's a heavy dependence on sibling relationships here: the style for "Favorites" can be found by navigating from w:t to ../preceding-sibling::w:pPr[1]/w:pStyle/@w:val.

People like JSON because the parser produces an in-memory data structure that's easier for applications to process, but that's not true if the application has to do this kind of navigation in the tree to follow semantic relationships between nodes (the trees produced by JSON parsers don't allow navigation to parents or siblings: the subject of my upcoming XML Prague talk). A mechanical conversion of this data structure to JSON, without thinking about the semantics, would probably produce something that is even harder to process.

Michael Kay
Saxonica


> On 23 Jan 2018, at 09:39, Michael Kay <mike@saxonica.com> wrote:
> 
> No, I don't think encoding this stuff in JSON rather than XML would have made it one iota more accessible. The problem is that it was designed bottom-up rather than top-down: it offers what's easiest for the implementation to deliver, not what is most convenient for the users to digest.
> 
> We've done the same thing with the SEF format which dumps the internal expression tree produced by the Saxon compiler - the XML (and in the next version, the JSON) is a dump of an internal data structure, and it's not what we would have designed if it were intended as a public standard. It's full of the little inconsistencies that arise when things grow organically, for example QNames being represented in different ways in different places. And the problem is compounded of course by the fact that once you make the data structure persistent, it becomes harder still to change.
> 
> Michael Kay
> Saxonica
> 
>> On 23 Jan 2018, at 03:58, Rick Jelliffe <rjelliffe@allette.com.au> wrote:
>> 
>> Here's a thought.  
>> 
>> OOXML (Office Open XML) is criticized for being like a dump of MS Office's binary format: it is not altogether unfair because the aim was to completely represent the native format and much of that was simply not "semantic" let alone elegant.  
>> 
>> But it meant that some technical at people freaked out when they saw it.  Not just because there was no SGML-ish mixed content or tree structure, or because MS clearly did not have adequate internal documentation or documentation QA for the most mission-critical software of businesses around the world [[what is ISO but an organization to facilitate QA of technical documentation?]], but also because it had such a severe reliance on chains of links and markup structures that were alien to the HTML kids.  (I will leave the ideological aspects out here.)
>> 
>> I wonder whether an objective cause to the subjective antagonism people felt towards it can be attributed to another factor:  they intuited that to some extent OOXML was trying to do in XML what really would be better to do in JSON?   I.e. moving around a big data structure.  
>> 
>> (And I certainly don't want to exclude the possibility that some parts would be better in XML and others in JSON, i.e. a JSON-in-XML-in-ZIP approach.)
>> 
>> Regards
>> Rick
> 
> 
> _______________________________________________________________________
> 
> 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