From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean-Christophe Helary Newsgroups: gmane.emacs.help Subject: Re:   and nXML mode Date: Wed, 11 Aug 2021 09:41:03 +0900 Message-ID: <0EE17D49-3E90-4BDA-8D8D-0343B194A7FF@traduction-libre.org> References: <31FB0752-BAB3-455A-B9F3-BA6948CE204A@traduction-libre.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2285"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 11 02:41:39 2021 Return-path: Envelope-to: geh-help-gnu-emacs@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 1mDcJP-0000Nv-0q for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 11 Aug 2021 02:41:39 +0200 Original-Received: from localhost ([::1]:58788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDcJN-0006if-0h for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 10 Aug 2021 20:41:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDcJ2-0006iV-GB for help-gnu-emacs@gnu.org; Tue, 10 Aug 2021 20:41:16 -0400 Original-Received: from relay9-d.mail.gandi.net ([217.70.183.199]:60999) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDcIz-0006jE-TM for help-gnu-emacs@gnu.org; Tue, 10 Aug 2021 20:41:16 -0400 Original-Received: (Authenticated sender: lists@traduction-libre.org) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 222B0FF802 for ; Wed, 11 Aug 2021 00:41:07 +0000 (UTC) In-Reply-To: X-Mailer: Apple Mail (2.3654.120.0.1.13) Received-SPF: pass client-ip=217.70.183.199; envelope-from=lists@traduction-libre.org; helo=relay9-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:132441 Archived-At: > On Aug 9, 2021, at 14:57, Yuri Khan wrote: >=20 > On Mon, 9 Aug 2021 at 09:22, Jean-Christophe Helary > wrote: >=20 >> Is there a reason why nXML mode refuses to consider   entities = as legit in a document that starts with: >>=20 >> >> >=20 > If you view that as an XML document (which is what nXML deals with), > without any preconceived knowledge of HTML5, there is nothing to > suggest that   is legit. >=20 > In XML, an entity can be defined inline within the doctype = declaration: >=20 > > ]> >=20 > or by reference to an external entity definition: >=20 > PUBLIC "-//W3C//DTD XHTML 1.1//EN" > SYSTEM "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> When I put that at the top of my file, nxml says "unexpected token". > (In the HTML5 spec, this is referred to as =E2=80=9Cobsolete permitted = DOCTYPE > string=E2=80=9D, and the obsoletion is from the HTML5 point of view. = I.e. if > you use an HTML5-aware parser, is sufficient to > declare an HTML5 document.) >=20 > If you fetch that url, you will see that it references a number of > modules, and if you chase references far enough, you will get to > http://www.w3.org/MarkUp/DTD/xhtml-lat1.ent which contains this as its > first significant line: >=20 > >=20 > and that=E2=80=99s what makes   a valid entity reference in an = XHTML document. >=20 > (XML processors normally have some shortcuts, such as DTD pre-cached > in the so-called XML catalog, so that they don=E2=80=99t have to fetch = them > from the network each time. XML catalog is keyed by the PUBLIC and/or > SYSTEM identifiers but not by the doctype root element name.) Thank you for explaining the process. I was not aware of how processors = handled the thing. But I guess trying to make nxml be aware all this goes well beyond the = scope of my work, so I'll just use html-mode. --=20 Jean-Christophe Helary @brandelune https://mac4translators.blogspot.com https://sr.ht/~brandelune/omegat-as-a-book/