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] Is the set of languages expressible using XML asuperset of the set of languages expressible using JSON?

It is always possible to model anything by adding a layer of interpretation. So you can say that an XML element X is an array by deeming all X elements so. And you can say that a JSON string field with name "comment" is a comment by deeming it so. 

But that is just cheating, it avoids the question of what is intrinsic without any extra layer of interpretation.

So here is an XML document for which there is no JSON equivalent, without conjuring up a magic extra layer of interpretation:

<z>
<!--  Hi -->
<x>Hi</x>
<y>Hi</>
</z>

The XML has a comment and elements x and y, and x and y have the same intrinsic role or status or information type as each other but not the comment.

If you wanted to make XML more markuppy (rather than more data-typey) you would increase the number of delimiters that tags can use, and so distinguish (pre-classify) more roles/status/lifecycle structures. For example define tags as only
  < symbol*  [^<]*  symbol* >
to allow more than just start and end tags, PIs, Comnents, declarations etc.

Rick

Regards
Rick

On Mon, 24 Jan. 2022, 10:15 Roger L Costello, <costello@mitre.org> wrote:
Hi Folks,

An XML language can be created to express Bookstores. Another to express network router data. Another for census data. And so forth.

The set of XML languages that has already been created is vast and diverse.

How big is the set of possible XML languages?

How big is the set of possible JSON languages?

Is the set of possible XML languages a superset of the set of possible JSON languages? If yes, would you give an example of an XML language for which there is no possible JSON language?

/Roger

_______________________________________________________________________

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