Re: [Json] JSON Schema Language

Phillip Hallam-Baker <ietf@hallambaker.com> Fri, 10 May 2019 13:31 UTC

Return-Path: <hallam@gmail.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 66F421201D6 for <json@ietfa.amsl.com>; Fri, 10 May 2019 06:31:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.648
X-Spam-Level:
X-Spam-Status: No, score=-1.648 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oAWL9FqkZJbZ for <json@ietfa.amsl.com>; Fri, 10 May 2019 06:31:55 -0700 (PDT)
Received: from mail-ot1-f65.google.com (mail-ot1-f65.google.com [209.85.210.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F34A512016D for <json@ietf.org>; Fri, 10 May 2019 06:31:54 -0700 (PDT)
Received: by mail-ot1-f65.google.com with SMTP id g24so1021956otq.2 for <json@ietf.org>; Fri, 10 May 2019 06:31:54 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hdptncFEFntke7vhJwBSmpnGLB+vhtzw0MzyMCKxjZY=; b=SBaJvo27aBpAg2d6Dw8tlYLgz2Nu6J9zFKIccvmJwkOiLYosOgbEv4IZQXeg1M0D9C 983YeP9En0H3/9KVtrE7D0Xt2gARNFNmqWJ+TqfiPeduylrUP+GmQmHr0GTxl1Fg+5P8 3/+8kbPOHWaSU8PMxcIdf4qziLOaOCk0zruLt7tM2yB7DC705fvEQNGNKElU1YDPjAyp EFXZYdwyQNl2VD8vI40cBR/T/vj9W+2E3Nx53Z4NiCT2+rmJU2LbJOzGXd75Y6SttXk8 NGiUkHZQZVx6QLORxZr6RHrySLOgFWQyhdUpNfwNGz8tZMPKmAnWs/QPayTCyIDwJus6 UEyg==
X-Gm-Message-State: APjAAAXlj6e/SjZTwP6benPWroh5s6Ta3/Wty8bU3c0oRbIvRmwevevn cpvhogg+V0CIfSaApYkjSvO57uA0GHI3QPrE3j4=
X-Google-Smtp-Source: APXvYqzT8iFy26QwSWbgd8pqsh2Lua8/n++qPCsoh0UaMiiDfqjyZ3WXtbtNXiVyFpK78nlGfVWiCwMcJnksTQz805g=
X-Received: by 2002:a9d:5a11:: with SMTP id v17mr6924930oth.150.1557495114208; Fri, 10 May 2019 06:31:54 -0700 (PDT)
MIME-Version: 1.0
References: <CAJK=1RjV1uv0eOdtFZ8cKn-FfCwCiGP5r2hOz1UamiM6YV4H1A@mail.gmail.com> <CAHBU6itE8kub1qtdRoW8BqxaOmzMv=vUo1aDeuAr3HX141NUGg@mail.gmail.com> <77994bdb-a400-be90-5893-b846a8e13899@gmail.com> <20190507154201.GP21049@localhost> <CEF72901-5077-4305-BA68-60624DCE952D@bzfx.net> <69ea0c99-e983-5972-c0aa-824ddeecb7c4@dret.net> <CAMm+LwjyVjnJuWE4+a9Ea=_X1uuEGuK+O4KojzN3uVQ+s+HqUQ@mail.gmail.com> <058f58a3-dd27-998e-5f54-4874aff5f2f0@dret.net> <20190507221726.GR21049@localhost> <CAJK=1Rj7PBD-bbwvsqgjQQzp4Aoidb-W2q5Lj6asMHHDHaTVYQ@mail.gmail.com> <646abf11-496b-c120-45d6-2a1aeab051a8@codalogic.com> <8224451C-F21B-41E5-A834-A9005050CB1F@tzi.org> <5a592d14-9468-6420-8420-52fd84a588fd@dret.net>
In-Reply-To: <5a592d14-9468-6420-8420-52fd84a588fd@dret.net>
From: Phillip Hallam-Baker <ietf@hallambaker.com>
Date: Fri, 10 May 2019 09:31:44 -0400
Message-ID: <CAMm+LwiNoyazUwqTiSxCitFQ=wuaS2N1biBo=7cbPu5H4vn2Xw@mail.gmail.com>
To: Erik Wilde <erik.wilde@dret.net>
Cc: Carsten Bormann <cabo@tzi.org>, Pete Cordell <petejson@codalogic.com>, Ulysse Carion <ulysse@segment.com>, JSON WG <json@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000059a5305888897a2"
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/JQ6xRgumrCZ6t7yyeFukcNRMewE>
Subject: Re: [Json] JSON Schema Language
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/json/>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 10 May 2019 13:31:57 -0000

On Wed, May 8, 2019 at 12:43 PM Erik Wilde <erik.wilde@dret.net> wrote:

> On 2019-05-08 08:46, Carsten Bormann wrote:
> > If I have to work on a W3C Schema(*), I convert it to Relax-NG compact
> first.  True, I’ll lose some information, but as a net result I'll digest
> much more information out of the W3C Schema document than if I had directly
> looked at that.
> > At the time when I was closer to the XML community, the hallway
> consensus was that W3C Schema was *designed* to sell more tools.
>
> that's one way to look at it. given the complexity of XSD's model (which
> is a different discussion to have), it's hard to imagine how you could
> easily work with it just using a generic underlying model (of any kind:
> even the RNG compact syntax isn't easily revealing all relationships).
>
> it's probably fair to say that any sufficiently complex domain model
> will require you to use tooling supporting it, instead of being able to
> just work with a source file of any format.
>
> to me, the first discussion to have is how complex/powerful you want the
> domain model to be (XSD went completely overboard there). *after* that
> has been decided, and if it is of modest complexity, then it may make
> sense to consider a syntax based on a generic model so that people can
> directly read (and possibly even write) the source.
>
> for old times sake, at https://www.xml.com/pub/a/2003/08/27/xscs.html is
> a specific XSD syntax we worked on to have a good "source file UX" for
> XSD. of course it never caught on because people used tools anyways, and
> this approach required specific code for reading and writing XSCS.
>

XSD was designed to be a replacement for SGML DDLs. It is a document
markup, not a data markup.

Document markup cares about the order in which fields are entered. Data
markup really doesn't.

XML has many features that are bogus. The distinction between elements and
attributes for example. But they were in SGML and XML couldn't drop them.

The decision to use SGML in the Web was purely driven by
deployment/adoption concerns. We all hated it. There were many technical
issues, the tooling was awful, the specification was broken. The only
reason HTML used SGML was to get the publishing industry onside.

XML was an attempt to get rid of as much of the stupid from SGML as
possible. XSD was a necessary part of enabling XML.