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] Which is more declarative? More XMLish?

Michael Kay wrote: "the result of serializing the map as JSON and then converting the JSON to XML will be an infinite XML document"

But this assumes a certain way of representing JSON data in XML (or, more generally, "information objects" in XML), an assumption which is as habitual as it is completely arbitrary. In this respect, XML thinkers may learn interesting things from JSON-LD [1], in which alternative serialization models and and their equivalence are defined (flat and deep).

With kind regards,
Hans-Juergen

[1] JSON-LD 1.0




Michael Kay <mike@saxonica.com> schrieb am 22:13 Samstag, 2.Dezember 2017:



> On 2 Dec 2017, at 18:15, Michael Kay <mike@saxonica.com> wrote:
>
>
> I don't think there is any rule that says the number of elements in a document must be finite.
>
> ...

> Perhaps more interestingly, XPath 3.1 introduces maps, and there is no rule that says a map must be finite. It is possible to take a finite graph structure (such as schema component model) and represent each node in the graph as a map; the map will then be infinite (you can navigate around it for ever, going round and round in circles).

Or perhaps more relevant to the topic, the result of serializing the map as JSON and then converting the JSON to XML will be an infinite XML document: one can envisage performing successful operations on such a document, for example asking how many level-2 elements it contains (the answer will be a finite number).


Michael Kay
Saxonica
_______________________________________________________________________

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