[Home] [By Thread] [By Date] [Recent Entries]

  • From: Ihe Onwuka <ihe.onwuka@g...>
  • To: Michael Kay <mike@s...>
  • Date: Mon, 24 Jan 2022 04:27:17 -0500

On Mon, Jan 24, 2022 at 3:29 AM Michael Kay <mike@s...> wrote:

An XML language can be created to express Bookstores. 

.....which allied with an XML schema can semantically represent books, magazines and newspapers as types of Publication (remember). A JSON document with or without an accompanying JSON Schema cannot do that.

Of course it can, it just does it differently. Instead of capturing the type of publication using the element name, you capture it with an extra attribute/property named "publicationType". You can argue about which representation is "better" (for example, better at conveying the semantics to the human reader), but they both capture the same information -- and neither conveys any semantics to the human reader unless they know what the element and attribute names are supposed to mean.


You can argue about whether they mean the same thing at all as would be the case if  "publicationType" is a JSON array that therefore permits multiple values.
 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member