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

Re: Was OOXML's problem that it should have used JSON not XML?

  • From: Michael Kay <mike@saxonica.com>
  • To: Michael Kay <mike@saxonica.com>
  • Date: Tue, 23 Jan 2018 10:21:55 +0000

Re:  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:pStyle w:val="Heading1"/>

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

> 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]


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.
First Name
Last Name
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.