From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] ffap.el: Exclude angle brackets from file names in XML Date: Sun, 10 Mar 2024 17:30:50 +0700 Message-ID: References: <874jdfkrno.fsf@strawberrytea.xyz> <86ttlewsb8.fsf@gnu.org> <01249b55-1cdf-40c6-92b8-16b1521baf33@app.fastmail.com> <86frwywpw7.fsf@gnu.org> <86cys2wmmr.fsf@gnu.org> Mime-Version: 1.0 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="14411"; mail-complaints-to="usenet@ciao.gmane.io" Cc: look@strawberrytea.xyz, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 10 11:31:56 2024 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 1rjGTC-0003Yy-SO for ged-emacs-devel@m.gmane-mx.org; Sun, 10 Mar 2024 11:31:54 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rjGSU-0007dr-CJ; Sun, 10 Mar 2024 06:31:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rjGSS-0007dI-Hw for emacs-devel@gnu.org; Sun, 10 Mar 2024 06:31:08 -0400 Original-Received: from mail-vs1-xe2b.google.com ([2607:f8b0:4864:20::e2b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rjGSO-0008W6-Ee; Sun, 10 Mar 2024 06:31:08 -0400 Original-Received: by mail-vs1-xe2b.google.com with SMTP id ada2fe7eead31-47282752fc7so735684137.2; Sun, 10 Mar 2024 03:31:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710066662; x=1710671462; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=d62Ba/cOSce1fc0mgQEa7jn/sDnXG/a1fp8MJwobSgk=; b=JDN/LvIj6POGrVD7CF/L2IxGDLWMoEctT5Ve+3ZZaWLnx8lj/AkgteM5vh5F2lcKQb BpJFgJoEGIkSn/qgd4050p18hzUBfLo1F8UvRtr1TcdiRKdN+rtvtpjA7m0qaSJXu3dx ZrsrjbvZpmm+KP4uLecK/myy5VvoZx4Yq2qp4A6UA0DSdM/7xEcy8C6xGZsWPwJq2SXQ kvvjsKL26hl2qHOalPzuAeCMBgIcLSUsDfkCOTQe12Cv/ume/YmTufctHQqlVtH7lO8+ 1kj09JnDOs9YlP8UMirfa0eLDOpf2LTN+0tWtdgnvSx2rpiI3ViDeBmpcThR2dfJrGDs FvZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710066662; x=1710671462; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d62Ba/cOSce1fc0mgQEa7jn/sDnXG/a1fp8MJwobSgk=; b=FpzLqIZkD5TAu0z5vgvw3TVg4TQtvviK73c/ejDfGXTtpSDuVLDKyjhs6jEmV5bL01 BwqykimsIXHvIha4m0Y1ZdRmA4omgTzwywvZ2dx90w+bC+428ljqu1Oux4fH69kioqa7 6BtYVHO4LvZIJ1kAUMymsSSVvxwHdeIa0f1CzRhb4G3xdNiurUbaC5GL703q69RFuLUe Ieya3mmGllfgVOEeFikszASZOqSgvbfvUcMH7rYpe+iwRGJd+wPJK5MI0sUfFeWOysAf 65Kkdix+QXOYqvFzWU6DkiasX+Z56c/djHLBhgKy3SImoC16myDmYC9mSLr4c+6s+19l gJgA== X-Forwarded-Encrypted: i=1; AJvYcCWxYLBmO/0F5iVXN4x7+47vJ7acVyv462eqeRg+8L3D+MgB5D66P+Zs0wlGtkdG7OCvm5J5Ka49ZSuE6QMr6EhZRpZt X-Gm-Message-State: AOJu0YzGOwhjXlE5VdzPTBcFQ2SlE7xXn0V8IQIl4vqu3KrTfemkQAyj Zhhe+5FKpeEBJhU0CYTqAN4iT1vyoqH598eBl2eS5+CSVstFUCCz2UuhkJjWclaM+hAsk62tHAr tQ4I1zb4gpxxgpZx7ZVZYQrzChfrp+NR5 X-Google-Smtp-Source: AGHT+IEIPwiyP2ib8OATd/1zwGVjMqdFVxSUiCnDSFeqhis9iKIOI4dCREDcviftWPV1ZBwfVY3aXn0DtVbSBokccrE= X-Received: by 2002:a05:6102:3234:b0:473:2636:4cfc with SMTP id x20-20020a056102323400b0047326364cfcmr949429vsf.20.1710066662160; Sun, 10 Mar 2024 03:31:02 -0700 (PDT) In-Reply-To: <86cys2wmmr.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::e2b; envelope-from=yurivkhan@gmail.com; helo=mail-vs1-xe2b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:316967 Archived-At: On Sun, 10 Mar 2024 at 14:51, Eli Zaretskii wrote: > > Tags do not inherently mean anything in XML. Only a specific XML-based > > format definition gives them meaning, and there is no way for either a > > doctype definition or an XML Schema to say =E2=80=9Celements named X > > definitely contain file names=E2=80=9D. The closest is XML Schema=E2=80= =99s anyURI > > datatype, but it might refer not necessarily to a local file but > > possibly to any other URI-addressed resource. > > Are you saying that applications using XML hard-code the meaning of > each tag that they need to process? IOW, how does a program using > such an XML know that the value is a file name? XML is a generic framework for designing formats. Each application designs a specific schema that defines which tags mean what. For example, XHTML is an XML subtype in which the element can have a src=3D"=E2=80=A6" attribute which contains an URI. In particular, it might contain a file name. For another example, SVG is an XML subtype that does not define an element; is invalid if used in an SVG document. On the other hand, SVG has an element whose href=3D"=E2=80=A6" attribute contains an URI. A program typically does not work with arbitrary XML. It works with a specific XML subtype, like OpenOffice with ODF (which is a ZIP archive containing, among others, some XML files) and Inkscape with SVG. In case an application is capable of understanding multiple XML-based formats, it must know beforehand which particular format a document is an instance of. For example, when Firefox receives an HTTP response with a =E2=80=98Content-Type: application/xhtml+xml=E2=80=99 header, it interprets= the response body as XHTML page; but with a =E2=80=98Content-Type: image/svg+xm= l=E2=80=99, it processes the body as an SVG image. (I did not expect you=E2=80=99d need a lecture on this.)