From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Org schemas we talked to be non-free, was: [ELPA] New package: repology.el Date: Tue, 26 Jan 2021 17:57:37 +0200 Message-ID: <83a6sv1yj2.fsf@gnu.org> References: <83zh0y2jtu.fsf@gnu.org> <83o8hd2gzl.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16927"; mail-complaints-to="usenet@ciao.gmane.io" Cc: bugs@gnu.support, ulm@gentoo.org, emacs-devel@gnu.org, ams@gnu.org, arthur.miller@live.com, dgutov@yandex.ru To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 26 16:58:44 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l4Qjs-0004GI-E6 for ged-emacs-devel@m.gmane-mx.org; Tue, 26 Jan 2021 16:58:44 +0100 Original-Received: from localhost ([::1]:48778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4Qjr-0000BP-Ea for ged-emacs-devel@m.gmane-mx.org; Tue, 26 Jan 2021 10:58:43 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4Qix-0007my-Nw for emacs-devel@gnu.org; Tue, 26 Jan 2021 10:57:47 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53565) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4Qiw-0005k5-87; Tue, 26 Jan 2021 10:57:46 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2551 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l4Qif-00071n-5f; Tue, 26 Jan 2021 10:57:31 -0500 In-Reply-To: (message from Richard Stallman on Tue, 26 Jan 2021 01:01:07 -0500) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:263464 Archived-At: > From: Richard Stallman > Cc: ulm@gentoo.org, bugs@gnu.support, ulm@gentoo.org, > emacs-devel@gnu.org, ams@gnu.org, arthur.miller@live.com, > dgutov@yandex.ru > Date: Tue, 26 Jan 2021 01:01:07 -0500 > > > A schema can be similarly "generalized" (a.k.a. "extended") without > > changing it: you include the schema in your own and then add your own > > data types and conditions. > > Can you please show me how sort of generalization is done? It isn't > allowed by editing the schema; the license of the schema does not give > permission for such modifications. > > Is there some other mechanism that can be used to do that job? If so, > could you please show me something about that mechanism, and what it > can and can't do? Basically you reference the original schema in yours, and then add your extensions or overrides. There are several methods available for that, but the simplest one is to define new elements using the ones defined in the original schema. Here's a simple example: This defines an element "US Address" using xs:string type defined in the W3C XMLSchema. Then you can define a new element "Contact", on top of that, by adding a name to an address: You can also extend an existing type: This extends the existing type "nameType" (presumably defined in some schema you include as above) by adding to it the sub-element "gen". There's also a facility to redefine existing data types. Etc. etc. This way, there's no reason to change the original schema, you just extend it in your own schema, using the original one as the baseline. A few resources to read up on this: https://www.w3schools.com/xml/el_extension.asp https://www.ibm.com/developerworks/library/x-xtendschema/index.html https://stackoverflow.com/questions/3392402/how-do-i-extend-a-base-schema-with-custom-elements-while-remaining-open-to-chang