Hi Folks, An XML Schema is a grammar. A JSON Schema is a grammar. In a sense, grammars represent our understanding of a domain. Here’s a relevant quote from the (excellent) book
Parsing Techniques: … the grammar in a sense represents our understanding of the
The ability to represent our understanding of a domain with a schema, create instances, and then have a machine validate the instances against the schema, well,
that seems to me to be a huge leap forward in our civilization’s ability to understand and process the universe. The subject of grammars has a long, rich history, rooted in formal theory: There is lots of support for grammars: XML Schema validators and design tools, JSON Schema validators and design tools, parser generators (e.g., ANTLR, BISON,
YACC), formal notations (e.g., BNF, EBNF), and so forth. The systematic creation of compilers, parsers, lexers are made possible only because of grammar theory. When you use schemas you are standing on the shoulders of giants (Chomsky, Aho, Hopcroft, Ullman, Clark, Jelliffe, Sperberg-McQueen, Thompson, etc.).
/Roger |