From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-pretest-bug@gnu.org, emacs-devel@gnu.org
Subject: Re: Refactoring xml.el namespace handling
Date: 05 Mar 2004 14:29:43 -0500 [thread overview]
Message-ID: <jwvk71zqf7t.fsf-monnier+emacs/devel@asado.iro.umontreal.ca> (raw)
In-Reply-To: <87d67r2k2a.fsf@weblog.localhost>
>> Thank you. Here is a counter patch. The main difference is that it uses
>> 'http://foo/bar rather than :http://foo/bar so as to avoid an unnecessary
>> (concat ":" foo) and also so that (symbol-name foo) immediately returns
>> a usable URL.
> There needs to be a way of differentiating between the (unlikely)
> namespace uri "nil" and "" (that is, no namespace), which is why I believe we
> need to stick with (concat ":" foo).
I must say that I do not know enough of those details to understand what
would be the ideal solution. I don't see where the confusion between "nil"
and "" could come from, but I do see that using a symbol such as the one
returned by (intern "") can be somewhat inconvenient if you ever want to
print&read the lisp representation.
I would actually recommend to intern all those symbols in a separate obarray
rather than in the main one. This way you could use nil for the "" case
without interfering with (intern "nil" xml-obarray). You could also then
use (intern-soft foo xml-obarray) to check whether foo already exists
without getting nasty surprises when foo is the string "nil".
Finally it would avoid polluting the main obarray.
> Also, since I believe we need a prefix, using ':' means less work for
> the programmer since :symbols are automatically interned. (FWIW, it
> was James Clark who gave me this idea of using ':' as the prefix.)
If a prefix is needed than indeed `:' is fine. I just feel like there's got
to be a way to avoid it altogether.
> I confess that I'm not very moved by the argument of a usable URL
> since namespace URIs needn't be usable URLs. My understanding is
> that they are essentially opaque IDs.
You're probably right. It just seems cleaner without the `:'.
If someone else wants to install this patch, please do. I don't have time
to look at it just now.
Stefan
next prev parent reply other threads:[~2004-03-05 19:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-05 19:03 Refactoring xml.el namespace handling Mark A. Hershberger
2004-03-05 19:29 ` Stefan Monnier [this message]
2004-04-14 18:36 ` Stefan Monnier
2004-04-16 3:14 ` Katsumi Yamaoka
2004-04-16 20:05 ` Mark A. Hershberger
2004-04-16 22:27 ` Stefan Monnier
-- strict thread matches above, loose matches on Subject: below --
2004-03-01 15:59 Mark A. Hershberger
2004-03-02 21:52 ` Stefan Monnier
2004-03-03 6:35 ` Mark A. Hershberger
2004-03-04 17:50 ` Stefan Monnier
2004-03-04 17:52 ` Stefan Monnier
2004-03-08 1:33 ` Kim F. Storm
2004-03-08 4:06 ` Mark A. Hershberger
2004-03-12 9:57 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvk71zqf7t.fsf-monnier+emacs/devel@asado.iro.umontreal.ca \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=emacs-pretest-bug@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.